--------------------- PatchSet 2292 Date: 2001/05/09 22:21:43 Author: akroonmaa Branch: cpuProfiling Tag: (none) Log: bring probes to new api style Members: lib/hash.c:1.6.12.1->1.6.12.2 lib/util.c:1.7.24.6->1.7.24.7 src/MemPool.c:1.5.24.1->1.5.24.2 src/acl.c:1.29.2.2->1.29.2.3 src/comm.c:1.11.6.2->1.11.6.3 src/comm_select.c:1.5.12.1->1.5.12.2 src/disk.c:1.5.24.3->1.5.24.4 src/store.c:1.11.8.2->1.11.8.3 Index: squid/lib/hash.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/hash.c,v retrieving revision 1.6.12.1 retrieving revision 1.6.12.2 diff -u -r1.6.12.1 -r1.6.12.2 --- squid/lib/hash.c 18 Apr 2001 18:05:18 -0000 1.6.12.1 +++ squid/lib/hash.c 9 May 2001 22:21:43 -0000 1.6.12.2 @@ -1,6 +1,6 @@ /* - * $Id: hash.c,v 1.6.12.1 2001/04/18 18:05:18 akroonmaa Exp $ + * $Id: hash.c,v 1.6.12.2 2001/05/09 22:21:43 akroonmaa Exp $ * * DEBUG: section 0 Hash Tables * AUTHOR: Harvest Derived @@ -184,17 +184,17 @@ { hash_link *walker; int b; - PROF(PR_start, "hash_lookup"); + PROF_start(hash_lookup); assert(k != NULL); b = hid->hash(k, hid->size); for (walker = hid->buckets[b]; walker != NULL; walker = walker->next) { if ((hid->cmp) (k, walker->key) == 0) { - PROF(PR_stop, "hash_lookup"); + PROF_stop(hash_lookup); return (walker); } assert(walker != walker->next); } - PROF(PR_stop, "hash_lookup"); + PROF_stop(hash_lookup); return NULL; } Index: squid/lib/util.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/util.c,v retrieving revision 1.7.24.6 retrieving revision 1.7.24.7 diff -u -r1.7.24.6 -r1.7.24.7 --- squid/lib/util.c 18 Apr 2001 18:12:59 -0000 1.7.24.6 +++ squid/lib/util.c 9 May 2001 22:21:43 -0000 1.7.24.7 @@ -1,6 +1,6 @@ /* - * $Id: util.c,v 1.7.24.6 2001/04/18 18:12:59 akroonmaa Exp $ + * $Id: util.c,v 1.7.24.7 2001/05/09 22:21:43 akroonmaa Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -435,13 +435,13 @@ { void *p; - PROF(PR_start, "xmalloc"); + PROF_start(xmalloc); if (sz < 1) sz = 1; - PROF(PR_start, "malloc"); + PROF_start(malloc); p = malloc(sz); - PROF(PR_stop, "malloc"); + PROF_stop(malloc); if (p == NULL) { if (failure_notify) { snprintf(msg, 128, "xmalloc: Unable to allocate %d bytes!\n", @@ -465,7 +465,7 @@ if (tracefp) fprintf(tracefp, "m:%d:%p\n", sz, p); #endif - PROF(PR_stop, "xmalloc"); + PROF_stop(xmalloc); return (p); } @@ -475,7 +475,7 @@ void xfree(void *s) { - PROF(PR_start, "xfree"); + PROF_start(xfree); #if XMALLOC_TRACE xmalloc_show_trace(s, -1); #endif @@ -490,14 +490,14 @@ if (tracefp && s) fprintf(tracefp, "f:%p\n", s); #endif - PROF(PR_stop, "xfree"); + PROF_stop(xfree); } /* xxfree() - like xfree(), but we already know s != NULL */ void xxfree(void *s) { - PROF(PR_start, "xxfree"); + PROF_start(xxfree); #if XMALLOC_TRACE xmalloc_show_trace(s, -1); #endif @@ -509,7 +509,7 @@ if (tracefp && s) fprintf(tracefp, "f:%p\n", s); #endif - PROF(PR_stop, "xxfree"); + PROF_stop(xxfree); } /* @@ -521,7 +521,7 @@ { void *p; - PROF(PR_start, "xrealloc"); + PROF_start(xrealloc); #if XMALLOC_TRACE xmalloc_show_trace(s, -1); #endif @@ -555,7 +555,7 @@ if (tracefp) /* new ptr, old ptr, new size */ fprintf(tracefp, "r:%p:%p:%d\n", p, s, sz); #endif - PROF(PR_stop, "xrealloc"); + PROF_stop(xrealloc); return (p); } @@ -568,14 +568,14 @@ { void *p; - PROF(PR_start, "xcalloc"); + PROF_start(xcalloc); if (n < 1) n = 1; if (sz < 1) sz = 1; - PROF(PR_start, "calloc"); + PROF_start(calloc); p = calloc(n, sz); - PROF(PR_stop, "calloc"); + PROF_stop(calloc); if (p == NULL) { if (failure_notify) { snprintf(msg, 128, "xcalloc: Unable to allocate %d blocks of %d bytes!\n", @@ -599,7 +599,7 @@ if (tracefp) fprintf(tracefp, "c:%d:%d:%p\n", n, sz, p); #endif - PROF(PR_stop, "xcalloc"); + PROF_stop(xcalloc); return (p); } @@ -612,7 +612,7 @@ { size_t sz; void *p; - PROF(PR_start, "xstrdup"); + PROF_start(xstrdup); if (s == NULL) { if (failure_notify) { (*failure_notify) ("xstrdup: tried to dup a NULL pointer!\n"); @@ -624,7 +624,7 @@ /* copy string, including terminating character */ sz = strlen(s) + 1; p = memcpy(xmalloc(sz), s, sz); - PROF(PR_stop, "xstrdup"); + PROF_stop(xstrdup); return p; } @@ -636,14 +636,14 @@ { size_t sz; void *p; - PROF(PR_start, "xstrndup"); + PROF_start(xstrndup); assert(s); assert(n); sz = strlen(s) + 1; if (sz > n) sz = n; p = xstrncpy(xmalloc(sz), s, sz); - PROF(PR_stop, "xstrndup"); + PROF_stop(xstrndup); return p; } @@ -716,14 +716,14 @@ xstrncpy(char *dst, const char *src, size_t n) { char *r = dst; - PROF(PR_start, "xstrncpy"); + PROF_start(xstrncpy); if (!n || !dst) return dst; if (src) while (--n != 0 && *src != '\0') *dst++ = *src++; *dst = '\0'; - PROF(PR_stop, "xstrncpy"); + PROF_stop(xstrncpy); return r; } @@ -732,14 +732,14 @@ xcountws(const char *str) { size_t count = 0; - PROF(PR_start, "xcountws"); + PROF_start(xcountws); if (str) { while (xisspace(*str)) { str++; count++; } } - PROF(PR_stop, "xcountws"); + PROF_stop(xcountws); return count; } Index: squid/src/MemPool.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/MemPool.c,v retrieving revision 1.5.24.1 retrieving revision 1.5.24.2 diff -u -r1.5.24.1 -r1.5.24.2 --- squid/src/MemPool.c 6 Apr 2001 19:57:57 -0000 1.5.24.1 +++ squid/src/MemPool.c 9 May 2001 22:21:43 -0000 1.5.24.2 @@ -1,6 +1,6 @@ /* - * $Id: MemPool.c,v 1.5.24.1 2001/04/06 19:57:57 akroonmaa Exp $ + * $Id: MemPool.c,v 1.5.24.2 2001/05/09 22:21:43 akroonmaa Exp $ * * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov @@ -230,7 +230,7 @@ memPoolAlloc(MemPool * pool) { void *p; - PROF(PR_start,"memPoolAlloc"); + PROF_start(memPoolAlloc); assert(pool); memMeterInc(pool->meter.inuse); gb_inc(&pool->meter.total, 1); @@ -251,14 +251,14 @@ memMeterAdd(TheMeter.alloc, pool->obj_size); p = xcalloc(1, pool->obj_size); } - PROF(PR_stop,"memPoolAlloc"); + PROF_stop(memPoolAlloc); return p; } void memPoolFree(MemPool * pool, void *obj) { - PROF(PR_start,"memPoolFree"); + PROF_start(memPoolFree); assert(pool && obj); memMeterDec(pool->meter.inuse); memMeterDel(TheMeter.inuse, pool->obj_size); @@ -274,7 +274,7 @@ xfree(obj); } assert(pool->meter.idle.level <= pool->meter.alloc.level); - PROF(PR_stop,"memPoolFree"); + PROF_stop(memPoolFree); } static void Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.29.2.2 retrieving revision 1.29.2.3 diff -u -r1.29.2.2 -r1.29.2.3 --- squid/src/acl.c 6 Apr 2001 20:51:21 -0000 1.29.2.2 +++ squid/src/acl.c 9 May 2001 22:21:43 -0000 1.29.2.3 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.29.2.2 2001/04/06 20:51:21 akroonmaa Exp $ + * $Id: acl.c,v 1.29.2.3 2001/05/09 22:21:43 akroonmaa Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1696,20 +1696,20 @@ int aclMatchAclList(const acl_list * list, aclCheck_t * checklist) { - PROF(PR_start,"aclMatchAclList"); + PROF_start(aclMatchAclList); while (list) { AclMatchedName = list->acl->name; debug(28, 3) ("aclMatchAclList: checking %s%s\n", list->op ? null_string : "!", list->acl->name); if (aclMatchAcl(list->acl, checklist) != list->op) { debug(28, 3) ("aclMatchAclList: returning 0\n"); - PROF(PR_stop,"aclMatchAclList"); + PROF_stop(aclMatchAclList); return 0; } list = list->next; } debug(28, 3) ("aclMatchAclList: returning 1\n"); - PROF(PR_stop,"aclMatchAclList"); + PROF_stop(aclMatchAclList); return 1; } @@ -1717,18 +1717,18 @@ aclCheckFast(const acl_access * A, aclCheck_t * checklist) { allow_t allow = ACCESS_DENIED; - PROF(PR_start,"aclCheckFast"); + PROF_start(aclCheckFast); debug(28, 5) ("aclCheckFast: list: %p\n", A); while (A) { allow = A->allow; if (aclMatchAclList(A->acl_list, checklist)) { - PROF(PR_stop,"aclCheckFast"); + PROF_stop(aclCheckFast); return allow == ACCESS_ALLOWED; } A = A->next; } debug(28, 5) ("aclCheckFast: no matches, returning: %d\n", allow == ACCESS_DENIED); - PROF(PR_stop,"aclCheckFast"); + PROF_stop(aclCheckFast); return allow == ACCESS_DENIED; } Index: squid/src/comm.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/comm.c,v retrieving revision 1.11.6.2 retrieving revision 1.11.6.3 diff -u -r1.11.6.2 -r1.11.6.3 --- squid/src/comm.c 18 Apr 2001 18:13:00 -0000 1.11.6.2 +++ squid/src/comm.c 9 May 2001 22:21:43 -0000 1.11.6.3 @@ -1,6 +1,6 @@ /* - * $Id: comm.c,v 1.11.6.2 2001/04/18 18:13:00 akroonmaa Exp $ + * $Id: comm.c,v 1.11.6.3 2001/05/09 22:21:43 akroonmaa Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -157,7 +157,7 @@ int new_socket; fde *F = NULL; - PROF(PR_start,"comm_open"); + PROF_start(comm_open); /* Create socket for accepting new connections. */ statCounter.syscalls.sock.sockets++; if ((new_socket = socket(AF_INET, sock_type, proto)) < 0) { @@ -173,7 +173,7 @@ default: debug(50, 0) ("comm_open: socket failure: %s\n", xstrerror()); } - PROF(PR_stop,"comm_open"); + PROF_stop(comm_open); return -1; } /* update fdstat */ @@ -193,7 +193,7 @@ if (commBind(new_socket, addr, port) != COMM_OK) { comm_close(new_socket); return -1; - PROF(PR_stop,"comm_open"); + PROF_stop(comm_open); } } F->local_port = port; @@ -201,7 +201,7 @@ if (flags & COMM_NONBLOCKING) if (commSetNonBlocking(new_socket) == COMM_ERROR) { return -1; - PROF(PR_stop,"comm_open"); + PROF_stop(comm_open); } #ifdef TCP_NODELAY if (sock_type == SOCK_STREAM) @@ -209,7 +209,7 @@ #endif if (Config.tcpRcvBufsz > 0 && sock_type == SOCK_STREAM) commSetTcpRcvbuf(new_socket, Config.tcpRcvBufsz); - PROF(PR_stop,"comm_open"); + PROF_stop(comm_open); return new_socket; } @@ -427,7 +427,7 @@ int err = 0; socklen_t errlen; assert(ntohs(address->sin_port) != 0); - PROF(PR_start,"comm_connect_addr"); + PROF_start(comm_connect_addr); /* Establish connection. */ errno = 0; if (!F->flags.called_connect) { @@ -463,7 +463,7 @@ #endif #endif } - PROF(PR_stop,"comm_connect_addr"); + PROF_stop(comm_connect_addr); if (errno == 0 || errno == EISCONN) status = COMM_OK; else if (ignoreErrno(errno)) @@ -493,9 +493,9 @@ fde *F = NULL; Slen = sizeof(P); statCounter.syscalls.sock.accepts++; - PROF(PR_start,"comm_accept"); + PROF_start(comm_accept); if ((sock = accept(fd, (struct sockaddr *) &P, &Slen)) < 0) { - PROF(PR_stop,"comm_accept"); + PROF_stop(comm_accept); if (ignoreErrno(errno)) { debug(50, 5) ("comm_accept: FD %d: %s\n", fd, xstrerror()); return COMM_NOMESSAGE; @@ -522,7 +522,7 @@ F->remote_port = htons(P.sin_port); F->local_port = htons(M.sin_port); commSetNonBlocking(sock); - PROF(PR_stop,"comm_accept"); + PROF_stop(comm_accept); return sock; } @@ -593,7 +593,7 @@ return; assert(F->flags.open); assert(F->type != FD_FILE); - PROF(PR_start,"comm_close"); + PROF_start(comm_close); F->flags.closing = 1; CommWriteStateCallbackAndFree(fd, COMM_ERR_CLOSING); commCallCloseHandlers(fd); @@ -602,7 +602,7 @@ fd_close(fd); /* update fdstat */ close(fd); statCounter.syscalls.sock.closes++; - PROF(PR_stop,"comm_close"); + PROF_stop(comm_close); } /* Send a udp datagram to specified TO_ADDR. */ @@ -614,10 +614,10 @@ int len) { int x; - PROF(PR_start,"comm_udp_sendto"); + PROF_start(comm_udp_sendto); statCounter.syscalls.sock.sendtos++; x = sendto(fd, buf, len, 0, (struct sockaddr *) to_addr, addr_len); - PROF(PR_stop,"comm_udp_sendto"); + PROF_stop(comm_udp_sendto); if (x < 0) { #ifdef _SQUID_LINUX_ if (ECONNREFUSED != errno) @@ -820,7 +820,7 @@ int len = 0; int nleft; - PROF(PR_start,"commHandleWrite"); + PROF_start(commHandleWrite); debug(5, 5) ("commHandleWrite: FD %d: off %d, sz %d.\n", fd, (int) state->offset, state->size); @@ -869,7 +869,7 @@ CommWriteStateCallbackAndFree(fd, COMM_OK); } } - PROF(PR_stop,"commHandleWrite"); + PROF_stop(commHandleWrite); } Index: squid/src/comm_select.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/comm_select.c,v retrieving revision 1.5.12.1 retrieving revision 1.5.12.2 diff -u -r1.5.12.1 -r1.5.12.2 --- squid/src/comm_select.c 6 Apr 2001 19:57:57 -0000 1.5.12.1 +++ squid/src/comm_select.c 9 May 2001 22:21:44 -0000 1.5.12.2 @@ -1,6 +1,6 @@ /* - * $Id: comm_select.c,v 1.5.12.1 2001/04/06 19:57:57 akroonmaa Exp $ + * $Id: comm_select.c,v 1.5.12.2 2001/05/09 22:21:44 akroonmaa Exp $ * * DEBUG: section 5 Socket Functions * @@ -205,7 +205,7 @@ PF *hdl = NULL; int npfds; struct pollfd pfds[3 + MAXHTTPPORTS]; - PROF(PR_start,"comm_check_incoming"); + PROF_start(comm_check_incoming); for (i = npfds = 0; i < nfds; i++) { int events; fd = fds[i]; @@ -222,7 +222,7 @@ } } if (!nfds) { - PROF(PR_stop,"comm_check_incoming"); + PROF_stop(comm_check_incoming); return -1; } #if !ALARM_UPDATES_TIME @@ -230,7 +230,7 @@ #endif statCounter.syscalls.polls++; if (poll(pfds, npfds, 0) < 1) { - PROF(PR_stop,"comm_check_incoming"); + PROF_stop(comm_check_incoming); return incame; } for (i = 0; i < npfds; i++) { @@ -254,7 +254,7 @@ fd); } } - PROF(PR_stop,"comm_check_incoming"); + PROF_stop(comm_check_incoming); return incame; } @@ -345,7 +345,7 @@ comm_poll_dns_incoming(); if (commCheckHTTPIncoming) comm_poll_http_incoming(); - PROF(PR_start,"comm_poll_prep_pfds"); + PROF_start(comm_poll_prep_pfds); callicp = calldns = callhttp = 0; nfds = 0; maxfd = Biggest_FD + 1; @@ -379,7 +379,7 @@ nfds++; } } - PROF(PR_stop,"comm_poll_prep_pfds"); + PROF_stop(comm_poll_prep_pfds); if (nfds == 0) { assert(shutting_down); return COMM_SHUTDOWN; @@ -387,11 +387,11 @@ if (msec > MAX_POLL_TIME) msec = MAX_POLL_TIME; for (;;) { - PROF(PR_start,"comm_poll_normal"); + PROF_start(comm_poll_normal); statCounter.syscalls.polls++; num = poll(pfds, nfds, msec); statCounter.select_loops++; - PROF(PR_stop,"comm_poll_normal"); + PROF_stop(comm_poll_normal); if (num >= 0) break; if (ignoreErrno(errno)) @@ -413,7 +413,7 @@ /* scan each socket but the accept socket. Poll this * more frequently to minimize losses due to the 5 connect * limit in SunOS */ - PROF(PR_start,"comm_handle_ready_fd"); + PROF_start(comm_handle_ready_fd); for (i = 0; i < nfds; i++) { fde *F; int revents; @@ -441,10 +441,10 @@ commAddSlowFd(fd); #endif else { - PROF(PR_start,"comm_read_handler"); + PROF_start(comm_read_handler); F->read_handler = NULL; hdl(fd, F->read_data); - PROF(PR_stop,"comm_read_handler"); + PROF_stop(comm_read_handler); statCounter.select_fds++; if (commCheckICPIncoming) comm_poll_icp_incoming(); @@ -457,10 +457,10 @@ if (revents & (POLLWRNORM | POLLOUT | POLLHUP | POLLERR)) { debug(5, 5) ("comm_poll: FD %d ready for writing\n", fd); if ((hdl = F->write_handler)) { - PROF(PR_start,"comm_write_handler"); + PROF_start(comm_write_handler); F->write_handler = NULL; hdl(fd, F->write_data); - PROF(PR_stop,"comm_write_handler"); + PROF_stop(comm_write_handler); statCounter.select_fds++; if (commCheckICPIncoming) comm_poll_icp_incoming(); @@ -495,7 +495,7 @@ fd_close(fd); } } - PROF(PR_stop,"comm_handle_ready_fd"); + PROF_stop(comm_handle_ready_fd); if (callicp) comm_poll_icp_incoming(); if (calldns) Index: squid/src/disk.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/disk.c,v retrieving revision 1.5.24.3 retrieving revision 1.5.24.4 diff -u -r1.5.24.3 -r1.5.24.4 --- squid/src/disk.c 27 Apr 2001 08:30:39 -0000 1.5.24.3 +++ squid/src/disk.c 9 May 2001 22:21:44 -0000 1.5.24.4 @@ -1,6 +1,6 @@ /* - * $Id: disk.c,v 1.5.24.3 2001/04/27 08:30:39 akroonmaa Exp $ + * $Id: disk.c,v 1.5.24.4 2001/05/09 22:21:44 akroonmaa Exp $ * * DEBUG: section 6 Disk I/O Routines * AUTHOR: Harvest Derived @@ -60,7 +60,7 @@ file_open(const char *path, int mode) { int fd; - PROF(PR_start, "file_open"); + PROF_start(file_open); if (mode & O_WRONLY) mode |= O_APPEND; mode |= SQUID_NONBLOCK; @@ -76,7 +76,7 @@ commSetCloseOnExec(fd); fd_open(fd, FD_FILE, path); } - PROF(PR_stop, "file_open"); + PROF_stop(file_open); return fd; } @@ -87,7 +87,7 @@ { fde *F = &fd_table[fd]; PF *read_callback; - PROF(PR_start, "file_close"); + PROF_start(file_close); assert(fd >= 0); assert(F->flags.open); if ((read_callback = F->read_handler)) { @@ -105,7 +105,7 @@ #else F->flags.close_request = 1; debug(6, 2) ("file_close: FD %d, delaying close\n", fd); - PROF(PR_stop, "file_close"); + PROF_stop(file_close); return; #endif } @@ -123,7 +123,7 @@ ("file_close: FD %d, really closing\n", fd); fd_close(fd); statCounter.syscalls.disk.closes++; - PROF(PR_stop, "file_close"); + PROF_stop(file_close); } /* @@ -188,7 +188,7 @@ int do_close; if (NULL == q) return; - PROF(PR_start,"diskHandleWrite"); + PROF_start(diskHandleWrite); debug(6, 3) ("diskHandleWrite: FD %d\n", fd); F->flags.write_daemon = 0; assert(fdd->write_q != NULL); @@ -285,13 +285,13 @@ * NOTE, this callback can close the FD, so we must * not touch 'F', 'fdd', etc. after this. */ - PROF(PR_stop,"diskHandleWrite"); + PROF_stop(diskHandleWrite); return; } } if (do_close) file_close(fd); - PROF(PR_stop,"diskHandleWrite"); + PROF_stop(diskHandleWrite); } @@ -309,7 +309,7 @@ { dwrite_q *wq = NULL; fde *F = &fd_table[fd]; - PROF(PR_start, "file_write"); + PROF_start(file_write); assert(fd >= 0); assert(F->flags.open); /* if we got here. Caller is eligible to write. */ @@ -334,7 +334,7 @@ cbdataLock(F->disk.wrt_handle_data); diskHandleWrite(fd, NULL); } - PROF(PR_stop, "file_write"); + PROF_stop(file_write); } /* @@ -363,7 +363,7 @@ memFree(ctrl_dat, MEM_DREAD_CTRL); return; } - PROF(PR_start,"diskHandleRead"); + PROF_start(diskHandleRead); if (F->disk.offset != ctrl_dat->offset) { debug(6, 3) ("diskHandleRead: FD %d seeking to offset %d\n", fd, (int) ctrl_dat->offset); @@ -380,7 +380,7 @@ if (len < 0) { if (ignoreErrno(errno)) { commSetSelect(fd, COMM_SELECT_READ, diskHandleRead, ctrl_dat, 0); - PROF(PR_stop,"diskHandleRead"); + PROF_stop(diskHandleRead); return; } debug(50, 1) ("diskHandleRead: FD %d: %s\n", fd, xstrerror()); @@ -393,7 +393,7 @@ ctrl_dat->handler(fd, ctrl_dat->buf, len, rc, ctrl_dat->client_data); cbdataUnlock(ctrl_dat->client_data); memFree(ctrl_dat, MEM_DREAD_CTRL); - PROF(PR_stop,"diskHandleRead"); + PROF_stop(diskHandleRead); } @@ -405,7 +405,7 @@ file_read(int fd, char *buf, int req_len, off_t offset, DRCB * handler, void *client_data) { dread_ctrl *ctrl_dat; - PROF(PR_start, "file_read"); + PROF_start(file_read); assert(fd >= 0); ctrl_dat = memAllocate(MEM_DREAD_CTRL); ctrl_dat->fd = fd; @@ -417,5 +417,5 @@ ctrl_dat->client_data = client_data; cbdataLock(client_data); diskHandleRead(fd, ctrl_dat); - PROF(PR_stop, "file_read"); + PROF_stop(file_read); } Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.11.8.2 retrieving revision 1.11.8.3 diff -u -r1.11.8.2 -r1.11.8.3 --- squid/src/store.c 18 Apr 2001 18:13:00 -0000 1.11.8.2 +++ squid/src/store.c 9 May 2001 22:21:44 -0000 1.11.8.3 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.11.8.2 2001/04/18 18:13:00 akroonmaa Exp $ + * $Id: store.c,v 1.11.8.3 2001/05/09 22:21:44 akroonmaa Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -317,10 +317,10 @@ storeGet(const cache_key * key) { void *p; - PROF(PR_start,"storeGet"); + PROF_start(storeGet); debug(20, 3) ("storeGet: looking up %s\n", storeKeyText(key)); p = hash_lookup(store_table, key); - PROF(PR_stop,"storeGet"); + PROF_stop(storeGet); return (StoreEntry *) p; } @@ -820,7 +820,7 @@ SwapDir *SD; static time_t last_warn_time = 0; - PROF(PR_start,"storeMaintainSwapSpace"); + PROF_start(storeMaintainSwapSpace); /* walk each fs */ for (i = 0; i < Config.cacheSwap.n_configured; i++) { /* call the maintain function .. */ @@ -840,7 +840,7 @@ } /* Reregister a maintain event .. */ eventAdd("MaintainSwapSpace", storeMaintainSwapSpace, NULL, 1.0, 1); - PROF(PR_stop,"storeMaintainSwapSpace"); + PROF_stop(storeMaintainSwapSpace); } @@ -848,7 +848,7 @@ void storeRelease(StoreEntry * e) { - PROF(PR_start,"storeRelease"); + PROF_start(storeRelease); debug(20, 3) ("storeRelease: Releasing: '%s'\n", storeKeyText(e->hash.key)); /* If, for any reason we can't discard this object because of an * outstanding request, mark it for pending release */ @@ -856,7 +856,7 @@ storeExpireNow(e); debug(20, 3) ("storeRelease: Only setting RELEASE_REQUEST bit\n"); storeReleaseRequest(e); - PROF(PR_stop,"storeRelease"); + PROF_stop(storeRelease); return; } if (store_dirs_rebuilding && e->swap_filen > -1) { @@ -873,7 +873,7 @@ e->lock_count++; EBIT_SET(e->flags, RELEASE_REQUEST); stackPush(&LateReleaseStack, e); - PROF(PR_stop,"storeRelease"); + PROF_stop(storeRelease); return; } else { destroy_StoreEntry(e); @@ -894,7 +894,7 @@ } storeSetMemStatus(e, NOT_IN_MEMORY); destroy_StoreEntry(e); - PROF(PR_stop,"storeRelease"); + PROF_stop(storeRelease); } static void