From: hno <> Date: Sun, 21 Jul 2002 05:51:02 +0000 (+0000) Subject: Large cleanup of debug sections X-Git-Tag: SQUID_3_0_PRE1~884 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17bb34863f3423b2109fd764b395c7c5850af023;p=thirdparty%2Fsquid.git Large cleanup of debug sections --- diff --git a/doc/debug-sections.txt b/doc/debug-sections.txt index b192ac07d2..a304b882c8 100644 --- a/doc/debug-sections.txt +++ b/doc/debug-sections.txt @@ -1,12 +1,11 @@ section 0 Announcement Server section 0 CGI Cache Manager section 0 Client Database -section 0 DNS Resolver section 0 Debug Routines -section 0 Hash Tables +section 0 DNS Resolver section 0 WWW Client section 1 Startup and Main Loop -section 2 UNUSED +section 2 Unlink Daemon section 3 Configuration File Parsing section 4 Error Generation section 5 Socket Functions @@ -16,12 +15,12 @@ section 8 Swap File Bitmap section 9 File Transfer Protocol (FTP) section 10 Gopher section 11 Hypertext Transfer Protocol (HTTP) -section 12 Unlink Daemon +section 12 Internet Cache Protocol section 13 High Level Memory Pool Management section 14 IP Cache -section 15 Request Forwarding +section 15 Neighbor Routines section 16 Cache Manager Objects -section 17 Neighbor Selection +section 17 Request Forwarding section 18 Cache Manager Statistics section 19 Store Memory Primitives section 20 Storage Manager @@ -33,7 +32,7 @@ section 25 MIME Parsing section 26 Secure Sockets Layer Proxy section 27 Cache Announcer section 28 Access Control -section 29 Redirector & Authentication +section 29 Authenticator section 30 Ident (RFC 931) section 31 Hypertext Caching Protocol section 32 Asynchronous Disk I/O @@ -44,7 +43,7 @@ section 36 Cache Directory Cleanup section 37 ICMP Routines section 38 Network Measurement Database section 39 Cache Array Routing Protocol -section 40 User-Agent logging +section 40 User-Agent and Referer logging section 41 Event Processing section 42 ICMP Pinger program section 43 AIOPS @@ -53,8 +52,8 @@ section 45 Callback Data Registry section 46 Access Log section 47 Store Directory Routines section 48 Persistent Connections -section 49 SNMP support -section 50 strerror() reporting +section 49 SNMP +section 50 Log file handling section 51 Filedescriptor Functions section 52 URN Parsing section 53 AS Number handling @@ -65,7 +64,7 @@ section 57 HTTP Status-line section 58 HTTP Reply (Response) section 59 auto-growing Memory Buffer with printf section 60 Packer: A uniform interface to store-like modules -section 61 PUMP handler +section 61 Redirector section 62 Generic Histogram section 63 Low Level Memory Pool Management section 64 HTTP Range Header @@ -82,7 +81,10 @@ section 74 HTTP Message section 75 WHOIS protocol section 76 Internal Squid Object handling section 77 Delay Pools -section 78 HTTP Connection Header -section 79 HTTP Meter Header +section 78 DNS lookups +section 79 Lowlevel store I/O section 80 WCCP -section 81 Store Removal/Replacement policy +section 81 Cache Store +section 82 External ACL +section 83 SSL accelerator support +section 64 Helper process maintenance diff --git a/src/fs/aufs/store_io_aufs.cc b/src/fs/aufs/store_io_aufs.cc index 57936bc9fe..41db0ce512 100644 --- a/src/fs/aufs/store_io_aufs.cc +++ b/src/fs/aufs/store_io_aufs.cc @@ -1,6 +1,6 @@ /* - * DEBUG 78 + * DEBUG 79 */ #include "squid.h" @@ -37,7 +37,7 @@ storeAufsOpen(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, #if !ASYNC_OPEN int fd; #endif - debug(78, 3) ("storeAufsOpen: fileno %08X\n", f); + debug(79, 3) ("storeAufsOpen: fileno %08X\n", f); /* * we should detect some 'too many files open' condition and return * NULL here. @@ -49,7 +49,7 @@ storeAufsOpen(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, #if !ASYNC_OPEN fd = file_open(path, O_RDONLY | O_BINARY); if (fd < 0) { - debug(78, 3) ("storeAufsOpen: got failure (%d)\n", errno); + debug(79, 3) ("storeAufsOpen: got failure (%d)\n", errno); return NULL; } #endif @@ -90,7 +90,7 @@ storeAufsCreate(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, STIOCB * c filn = storeAufsDirMapBitAllocate(SD); path = storeAufsDirFullPath(SD, filn, NULL); - debug(78, 3) ("storeAufsCreate: fileno %08X\n", filn); + debug(79, 3) ("storeAufsCreate: fileno %08X\n", filn); /* * we should detect some 'too many files open' condition and return * NULL here. @@ -102,7 +102,7 @@ storeAufsCreate(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, STIOCB * c #if !ASYNC_CREATE fd = file_open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY); if (fd < 0) { - debug(78, 3) ("storeAufsCreate: got failure (%d)\n", errno); + debug(79, 3) ("storeAufsCreate: got failure (%d)\n", errno); return NULL; } #endif @@ -137,7 +137,7 @@ void storeAufsClose(SwapDir * SD, storeIOState * sio) { squidaiostate_t *aiostate = (squidaiostate_t *) sio->fsstate; - debug(78, 3) ("storeAufsClose: dirno %d, fileno %08X, FD %d\n", + debug(79, 3) ("storeAufsClose: dirno %d, fileno %08X, FD %d\n", sio->swap_dirn, sio->swap_filen, aiostate->fd); if (storeAufsSomethingPending(sio)) { aiostate->flags.close_request = 1; @@ -157,7 +157,7 @@ storeAufsRead(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t of assert(!aiostate->flags.reading); if (aiostate->fd < 0) { struct _queued_read *q; - debug(78, 3) ("storeAufsRead: queueing read because FD < 0\n"); + debug(79, 3) ("storeAufsRead: queueing read because FD < 0\n"); assert(aiostate->flags.opening); assert(aiostate->pending_reads == NULL); q = memPoolAlloc(aufs_qread_pool); @@ -172,7 +172,7 @@ storeAufsRead(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t of sio->read.callback = callback; sio->read.callback_data = cbdataReference(callback_data); aiostate->read_buf = buf; - debug(78, 3) ("storeAufsRead: dirno %d, fileno %08X, FD %d\n", + debug(79, 3) ("storeAufsRead: dirno %d, fileno %08X, FD %d\n", sio->swap_dirn, sio->swap_filen, aiostate->fd); sio->offset = offset; aiostate->flags.reading = 1; @@ -189,7 +189,7 @@ void storeAufsWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func) { squidaiostate_t *aiostate = (squidaiostate_t *) sio->fsstate; - debug(78, 3) ("storeAufsWrite: dirno %d, fileno %08X, FD %d\n", + debug(79, 3) ("storeAufsWrite: dirno %d, fileno %08X, FD %d\n", sio->swap_dirn, sio->swap_filen, aiostate->fd); if (aiostate->fd < 0) { /* disk file not opened yet */ @@ -206,7 +206,7 @@ storeAufsWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t o #if ASYNC_WRITE if (aiostate->flags.writing) { struct _queued_write *q; - debug(78, 3) ("storeAufsWrite: queuing write\n"); + debug(79, 3) ("storeAufsWrite: queuing write\n"); q = memPoolAlloc(aufs_qwrite_pool); q->buf = buf; q->size = size; @@ -228,7 +228,7 @@ storeAufsWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t o void storeAufsUnlink(SwapDir * SD, StoreEntry * e) { - debug(78, 3) ("storeAufsUnlink: dirno %d, fileno %08X\n", SD->index, e->swap_filen); + debug(79, 3) ("storeAufsUnlink: dirno %d, fileno %08X\n", SD->index, e->swap_filen); storeAufsDirReplRemove(e); storeAufsDirMapBitReset(SD, e->swap_filen); storeAufsDirUnlinkFile(SD, e->swap_filen); @@ -243,7 +243,7 @@ storeAufsKickWriteQueue(storeIOState * sio) struct _queued_write *q = linklistShift(&aiostate->pending_writes); if (NULL == q) return 0; - debug(78, 3) ("storeAufsKickWriteQueue: writing queued chunk of %ld bytes\n", + debug(79, 3) ("storeAufsKickWriteQueue: writing queued chunk of %ld bytes\n", (long int) q->size); storeAufsWrite(INDEXSD(sio->swap_dirn), sio, q->buf, q->size, q->offset, q->free_func); memPoolFree(aufs_qwrite_pool, q); @@ -257,7 +257,7 @@ storeAufsKickReadQueue(storeIOState * sio) struct _queued_read *q = linklistShift(&(aiostate->pending_reads)); if (NULL == q) return 0; - debug(78, 3) ("storeAufsKickReadQueue: reading queued request of %ld bytes\n", + debug(79, 3) ("storeAufsKickReadQueue: reading queued request of %ld bytes\n", (long int) q->size); storeAufsRead(INDEXSD(sio->swap_dirn), sio, q->buf, q->size, q->offset, q->callback, q->callback_data); memPoolFree(aufs_qread_pool, q); @@ -269,13 +269,13 @@ storeAufsOpenDone(int unused, void *my_data, int fd, int errflag) { storeIOState *sio = my_data; squidaiostate_t *aiostate = (squidaiostate_t *) sio->fsstate; - debug(78, 3) ("storeAufsOpenDone: FD %d, errflag %d\n", fd, errflag); + debug(79, 3) ("storeAufsOpenDone: FD %d, errflag %d\n", fd, errflag); Opening_FD--; aiostate->flags.opening = 0; if (errflag || fd < 0) { errno = errflag; - debug(78, 0) ("storeAufsOpenDone: %s\n", xstrerror()); - debug(78, 1) ("\t%s\n", storeAufsDirFullPath(INDEXSD(sio->swap_dirn), sio->swap_filen, NULL)); + debug(79, 0) ("storeAufsOpenDone: %s\n", xstrerror()); + debug(79, 1) ("\t%s\n", storeAufsDirFullPath(INDEXSD(sio->swap_dirn), sio->swap_filen, NULL)); storeAufsIOCallback(sio, DISK_ERROR); return; } @@ -289,7 +289,7 @@ storeAufsOpenDone(int unused, void *my_data, int fd, int errflag) storeAufsKickReadQueue(sio); if (aiostate->flags.close_request) storeAufsIOCallback(sio, errflag); - debug(78, 3) ("storeAufsOpenDone: exiting\n"); + debug(79, 3) ("storeAufsOpenDone: exiting\n"); } #if ASYNC_READ @@ -305,12 +305,12 @@ storeAufsReadDone(int fd, const char *buf, int len, int errflag, void *my_data) STRCB *callback = sio->read.callback; void *cbdata; ssize_t rlen; - debug(78, 3) ("storeAufsReadDone: dirno %d, fileno %08X, FD %d, len %d\n", + debug(79, 3) ("storeAufsReadDone: dirno %d, fileno %08X, FD %d, len %d\n", sio->swap_dirn, sio->swap_filen, fd, len); aiostate->flags.inreaddone = 1; aiostate->flags.reading = 0; if (errflag) { - debug(78, 3) ("storeAufsReadDone: got failure (%d)\n", errflag); + debug(79, 3) ("storeAufsReadDone: got failure (%d)\n", errflag); rlen = -1; } else { rlen = (ssize_t) len; @@ -347,7 +347,7 @@ storeAufsWriteDone(int fd, int errflag, size_t len, void *my_data) static int loop_detect = 0; storeIOState *sio = my_data; squidaiostate_t *aiostate = (squidaiostate_t *) sio->fsstate; - debug(78, 3) ("storeAufsWriteDone: dirno %d, fileno %08X, FD %d, len %ld, err=%d\n", + debug(79, 3) ("storeAufsWriteDone: dirno %d, fileno %08X, FD %d, len %ld, err=%d\n", sio->swap_dirn, sio->swap_filen, fd, (long int) len, errflag); #if ASYNC_WRITE /* Translate from errno to Squid disk error */ @@ -360,7 +360,7 @@ storeAufsWriteDone(int fd, int errflag, size_t len, void *my_data) assert(++loop_detect < 10); aiostate->flags.writing = 0; if (errflag) { - debug(78, 0) ("storeAufsWriteDone: got failure (%d)\n", errflag); + debug(79, 0) ("storeAufsWriteDone: got failure (%d)\n", errflag); storeAufsIOCallback(sio, errflag); loop_detect--; return; @@ -390,24 +390,24 @@ storeAufsIOCallback(storeIOState * sio, int errflag) STIOCB *callback = sio->callback; squidaiostate_t *aiostate = (squidaiostate_t *) sio->fsstate; int fd = aiostate->fd; - debug(78, 3) ("storeAufsIOCallback: errflag=%d\n", errflag); - debug(78, 3) ("%s:%d\n", __FILE__, __LINE__); + debug(79, 3) ("storeAufsIOCallback: errflag=%d\n", errflag); + debug(79, 3) ("%s:%d\n", __FILE__, __LINE__); if (callback) { void *cbdata; sio->callback = NULL; if (cbdataReferenceValidDone(sio->callback_data, &cbdata)) callback(cbdata, errflag, sio); } - debug(78, 3) ("%s:%d\n", __FILE__, __LINE__); + debug(79, 3) ("%s:%d\n", __FILE__, __LINE__); aiostate->fd = -1; cbdataFree(sio); if (fd < 0) return; - debug(78, 3) ("%s:%d\n", __FILE__, __LINE__); + debug(79, 3) ("%s:%d\n", __FILE__, __LINE__); aioClose(fd); fd_close(fd); store_open_disk_fd--; - debug(78, 3) ("%s:%d\n", __FILE__, __LINE__); + debug(79, 3) ("%s:%d\n", __FILE__, __LINE__); } diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 12aae0ca56..748be2c912 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -1,8 +1,8 @@ /* - * $Id: store_dir_coss.cc,v 1.35 2002/06/26 09:55:57 hno Exp $ + * $Id: store_dir_coss.cc,v 1.36 2002/07/20 23:51:05 hno Exp $ * - * DEBUG: section 81 Store COSS Directory Routines + * DEBUG: section 47 Store COSS Directory Routines * AUTHOR: Eric Stern * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -132,10 +132,10 @@ storeCossDirOpenSwapLog(SwapDir * sd) path = storeCossDirSwapLogFile(sd, NULL); fd = file_open(path, O_WRONLY | O_CREAT | O_BINARY); if (fd < 0) { - debug(81, 1) ("%s: %s\n", path, xstrerror()); + debug(79, 1) ("%s: %s\n", path, xstrerror()); fatal("storeCossDirOpenSwapLog: Failed to open swap log."); } - debug(81, 3) ("Cache COSS Dir #%d log opened on FD %d\n", sd->index, fd); + debug(79, 3) ("Cache COSS Dir #%d log opened on FD %d\n", sd->index, fd); cs->swaplog_fd = fd; } @@ -146,7 +146,7 @@ storeCossDirCloseSwapLog(SwapDir * sd) if (cs->swaplog_fd < 0) /* not open */ return; file_close(cs->swaplog_fd); - debug(81, 3) ("Cache COSS Dir #%d log closed on FD %d\n", + debug(79, 3) ("Cache COSS Dir #%d log closed on FD %d\n", sd->index, cs->swaplog_fd); cs->swaplog_fd = -1; } @@ -160,7 +160,7 @@ storeCossDirInit(SwapDir * sd) storeCossDirRebuild(sd); cs->fd = file_open(sd->path, O_RDWR | O_CREAT); if (cs->fd < 0) { - debug(81, 1) ("%s: %s\n", sd->path, xstrerror()); + debug(79, 1) ("%s: %s\n", sd->path, xstrerror()); fatal("storeCossDirInit: Failed to open a COSS directory."); } n_coss_dirs++; @@ -214,7 +214,7 @@ storeCossRebuildFromSwapLog(void *data) /* load a number of objects per invocation */ for (count = 0; count < rb->speed; count++) { if (fread(&s, ss, 1, rb->log) != 1) { - debug(81, 1) ("Done reading %s swaplog (%d entries)\n", + debug(79, 1) ("Done reading %s swaplog (%d entries)\n", rb->sd->path, rb->n_read); fclose(rb->log); rb->log = NULL; diff --git a/src/fs/coss/store_io_coss.cc b/src/fs/coss/store_io_coss.cc index 6c4c2f4176..bdcb2aca22 100644 --- a/src/fs/coss/store_io_coss.cc +++ b/src/fs/coss/store_io_coss.cc @@ -1,8 +1,8 @@ /* - * $Id: store_io_coss.cc,v 1.15 2002/06/26 09:55:57 hno Exp $ + * $Id: store_io_coss.cc,v 1.16 2002/07/20 23:51:05 hno Exp $ * - * DEBUG: section 81 Storage Manager COSS Interface + * DEBUG: section 79 Storage Manager COSS Interface * AUTHOR: Eric Stern * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -97,7 +97,7 @@ storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which) cs->current_membuf->flags.full = 1; cs->current_membuf->diskend = cs->current_offset - 1; cs->current_offset = 0; /* wrap back to beginning */ - debug(81, 2) ("storeCossAllocate: wrap to 0\n"); + debug(79, 2) ("storeCossAllocate: wrap to 0\n"); newmb = storeCossCreateMemBuf(SD, 0, checkf, &coll); cs->current_membuf = newmb; @@ -109,7 +109,7 @@ storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which) */ cs->current_membuf->flags.full = 1; cs->current_offset = cs->current_membuf->diskend + 1; - debug(81, 2) ("storeCossAllocate: New offset - %ld\n", + debug(79, 2) ("storeCossAllocate: New offset - %ld\n", (long int) cs->current_offset); newmb = storeCossCreateMemBuf(SD, cs->current_offset, checkf, &coll); cs->current_membuf = newmb; @@ -120,7 +120,7 @@ storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which) cs->current_offset = retofs + allocsize; return retofs; } else { - debug(81, 3) ("storeCossAllocate: Collision\n"); + debug(79, 3) ("storeCossAllocate: Collision\n"); return -1; } } @@ -128,7 +128,7 @@ storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which) void storeCossUnlink(SwapDir * SD, StoreEntry * e) { - debug(81, 3) ("storeCossUnlink: offset %d\n", e->swap_filen); + debug(79, 3) ("storeCossUnlink: offset %d\n", e->swap_filen); storeCossRemove(SD, e); } @@ -159,7 +159,7 @@ storeCossCreate(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, STIOCB * c sio->st_size = objectLen(e) + e->mem_obj->swap_hdr_sz; sio->swap_dirn = SD->index; sio->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_ALLOCATE); - debug(81, 3) ("storeCossCreate: offset %d, size %ld, end %ld\n", sio->swap_filen, (long int) sio->st_size, (long int) (sio->swap_filen + sio->st_size)); + debug(79, 3) ("storeCossCreate: offset %d, size %ld, end %ld\n", sio->swap_filen, (long int) sio->st_size, (long int) (sio->swap_filen + sio->st_size)); sio->callback = callback; sio->file_callback = file_callback; @@ -188,7 +188,7 @@ storeCossOpen(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, sfileno f = e->swap_filen; CossInfo *cs = (CossInfo *) SD->fsdata; - debug(81, 3) ("storeCossOpen: offset %d\n", f); + debug(79, 3) ("storeCossOpen: offset %d\n", f); CBDATA_INIT_TYPE_FREECB(storeIOState, storeCossIOFreeEntry); sio = cbdataAlloc(storeIOState); @@ -232,7 +232,7 @@ storeCossOpen(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, /* We have to clean up neatly .. */ cbdataFree(sio); cs->numcollisions++; - debug(81, 2) ("storeCossOpen: Reallocation of %d/%d failed\n", e->swap_dirn, e->swap_filen); + debug(79, 2) ("storeCossOpen: Reallocation of %d/%d failed\n", e->swap_dirn, e->swap_filen); /* XXX XXX XXX Will squid call storeUnlink for this object? */ return NULL; } @@ -263,7 +263,7 @@ storeCossOpen(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, void storeCossClose(SwapDir * SD, storeIOState * sio) { - debug(81, 3) ("storeCossClose: offset %d\n", sio->swap_filen); + debug(79, 3) ("storeCossClose: offset %d\n", sio->swap_filen); if (sio->mode == O_WRONLY) storeCossMemBufUnlock(SD, sio); storeCossIOCallback(sio, 0); @@ -280,7 +280,7 @@ storeCossRead(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t of assert(sio->read.callback_data == NULL); sio->read.callback = callback; sio->read.callback_data = cbdataReference(callback_data); - debug(81, 3) ("storeCossRead: offset %ld\n", (long int) offset); + debug(79, 3) ("storeCossRead: offset %ld\n", (long int) offset); sio->offset = offset; cstate->flags.reading = 1; if ((offset + size) > sio->st_size) @@ -320,7 +320,7 @@ storeCossWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t o */ assert(sio->e->mem_obj->object_sz != -1); - debug(81, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) sio->offset, (unsigned long int) size); + debug(79, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) sio->offset, (unsigned long int) size); diskoffset = sio->swap_filen + sio->offset; dest = storeCossMemPointerFromDiskOffset(SD, diskoffset, &membuf); assert(dest != NULL); @@ -344,11 +344,11 @@ storeCossReadDone(int fd, const char *buf, int len, int errflag, void *my_data) CossState *cstate = (CossState *) sio->fsstate; size_t rlen; - debug(81, 3) ("storeCossReadDone: fileno %d, FD %d, len %d\n", + debug(79, 3) ("storeCossReadDone: fileno %d, FD %d, len %d\n", sio->swap_filen, fd, len); cstate->flags.reading = 0; if (errflag) { - debug(81, 3) ("storeCossReadDone: got failure (%d)\n", errflag); + debug(79, 3) ("storeCossReadDone: got failure (%d)\n", errflag); rlen = -1; } else { if (cstate->readbuffer == NULL) { @@ -374,7 +374,7 @@ storeCossIOCallback(storeIOState * sio, int errflag) CossState *cstate = (CossState *) sio->fsstate; STIOCB *callback = sio->callback; void *cbdata; - debug(81, 3) ("storeCossIOCallback: errflag=%d\n", errflag); + debug(79, 3) ("storeCossIOCallback: errflag=%d\n", errflag); xfree(cstate->readbuffer); sio->callback = NULL; if (cbdataReferenceValidDone(sio->callback_data, &cbdata)) @@ -413,12 +413,12 @@ storeCossMemBufLock(SwapDir * SD, storeIOState * e) for (m = cs->membufs.head; m; m = m->next) { t = m->data; if ((e->swap_filen >= t->diskstart) && (e->swap_filen <= t->diskend)) { - debug(81, 3) ("storeCossMemBufLock: locking %p, lockcount %d\n", t, t->lockcount); + debug(79, 3) ("storeCossMemBufLock: locking %p, lockcount %d\n", t, t->lockcount); t->lockcount++; return; } } - debug(81, 3) ("storeCossMemBufLock: FAILED to lock %p\n", e); + debug(79, 3) ("storeCossMemBufLock: FAILED to lock %p\n", e); } static void @@ -438,7 +438,7 @@ storeCossMemBufUnlock(SwapDir * SD, storeIOState * e) t = m->data; if ((e->swap_filen >= t->diskstart) && (e->swap_filen <= t->diskend)) { t->lockcount--; - debug(81, 3) ("storeCossMemBufUnlock: unlocking %p, lockcount %d\n", t, t->lockcount); + debug(79, 3) ("storeCossMemBufUnlock: unlocking %p, lockcount %d\n", t, t->lockcount); } if (t->flags.full && !t->flags.writing && !t->lockcount) storeCossWriteMemBuf(SD, t); @@ -473,7 +473,7 @@ static void storeCossWriteMemBuf(SwapDir * SD, CossMemBuf * t) { CossInfo *cs = (CossInfo *) SD->fsdata; - debug(81, 3) ("storeCossWriteMemBuf: offset %ld, len %ld\n", + debug(79, 3) ("storeCossWriteMemBuf: offset %ld, len %ld\n", (long int) t->diskstart, (long int) (t->diskend - t->diskstart)); t->flags.writing = 1; /* Remember that diskstart/diskend are block offsets! */ @@ -488,9 +488,9 @@ storeCossWriteMemBufDone(int fd, int errflag, size_t len, void *my_data) CossMemBuf *t = my_data; CossInfo *cs = (CossInfo *) t->SD->fsdata; - debug(81, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int) len); + debug(79, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int) len); if (errflag) - debug(81, 0) ("storeCossMemBufWriteDone: got failure (%d)\n", errflag); + debug(79, 0) ("storeCossMemBufWriteDone: got failure (%d)\n", errflag); dlinkDelete(&t->node, &cs->membufs); cbdataFree(t); @@ -509,8 +509,8 @@ storeCossCreateMemBuf(SwapDir * SD, size_t start, CBDATA_INIT_TYPE_FREECB(CossMemBuf, NULL); newmb = cbdataAlloc(CossMemBuf); newmb->diskstart = start; - debug(81, 3) ("storeCossCreateMemBuf: creating new membuf at %ld\n", (long int) newmb->diskstart); - debug(81, 3) ("storeCossCreateMemBuf: at %p\n", newmb); + debug(79, 3) ("storeCossCreateMemBuf: creating new membuf at %ld\n", (long int) newmb->diskstart); + debug(79, 3) ("storeCossCreateMemBuf: at %p\n", newmb); newmb->diskend = newmb->diskstart + COSS_MEMBUF_SZ - 1; newmb->flags.full = 0; newmb->flags.writing = 0; @@ -522,7 +522,7 @@ storeCossCreateMemBuf(SwapDir * SD, size_t start, /* Print out the list of membufs */ for (m = cs->membufs.head; m; m = m->next) { t = m->data; - debug(81, 3) ("storeCossCreateMemBuf: membuflist %ld lockcount %d\n", (long int) t->diskstart, t->lockcount); + debug(79, 3) ("storeCossCreateMemBuf: membuflist %ld lockcount %d\n", (long int) t->diskstart, t->lockcount); } /* @@ -541,7 +541,7 @@ storeCossCreateMemBuf(SwapDir * SD, size_t start, break; } if (numreleased > 0) - debug(81, 3) ("storeCossCreateMemBuf: this allocation released %d storeEntries\n", numreleased); + debug(79, 3) ("storeCossCreateMemBuf: this allocation released %d storeEntries\n", numreleased); return newmb; } diff --git a/src/fs/diskd/store_dir_diskd.cc b/src/fs/diskd/store_dir_diskd.cc index a9f875cf89..c9d2779c4a 100644 --- a/src/fs/diskd/store_dir_diskd.cc +++ b/src/fs/diskd/store_dir_diskd.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_diskd.cc,v 1.67 2002/06/26 09:55:58 hno Exp $ + * $Id: store_dir_diskd.cc,v 1.68 2002/07/20 23:51:06 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -515,7 +515,7 @@ storeDiskdDirCallback(SwapDir * SD) if (x < 0) break; else if (x != msg_snd_rcv_sz) { - debug(81, 1) ("storeDiskdDirCallback: msgget returns %d\n", + debug(79, 1) ("storeDiskdDirCallback: msgget returns %d\n", x); break; } @@ -1981,6 +1981,6 @@ storeFsSetup_diskd(storefs_entry_t * storefs) diskd_state_pool = memPoolCreate("DISKD IO State data", sizeof(diskdstate_t)); memset(&diskd_stats, '\0', sizeof(diskd_stats)); cachemgrRegister("diskd", "DISKD Stats", storeDiskdStats, 0, 1); - debug(81, 1) ("diskd started\n"); + debug(79, 1) ("diskd started\n"); diskd_initialised = 1; } diff --git a/src/fs/diskd/store_io_diskd.cc b/src/fs/diskd/store_io_diskd.cc index 7b21e13cb7..9eb31a9e2e 100644 --- a/src/fs/diskd/store_io_diskd.cc +++ b/src/fs/diskd/store_io_diskd.cc @@ -1,8 +1,8 @@ /* - * $Id: store_io_diskd.cc,v 1.23 2002/04/13 23:07:56 hno Exp $ + * $Id: store_io_diskd.cc,v 1.24 2002/07/20 23:51:06 hno Exp $ * - * DEBUG: section 81 Squid-side DISKD I/O functions. + * DEBUG: section 79 Squid-side DISKD I/O functions. * AUTHOR: Duane Wessels * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -61,12 +61,12 @@ storeDiskdOpen(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, diskdstate_t *diskdstate; off_t shm_offset; diskdinfo_t *diskdinfo = SD->fsdata; - debug(81, 3) ("storeDiskdOpen: fileno %08X\n", f); + debug(79, 3) ("storeDiskdOpen: fileno %08X\n", f); /* * Fail on open() if there are too many requests queued. */ if (diskdinfo->away > diskdinfo->magic1) { - debug(81, 3) ("storeDiskdOpen: FAILING, too many requests away\n"); + debug(79, 3) ("storeDiskdOpen: FAILING, too many requests away\n"); diskd_stats.open_fail_queue_len++; return NULL; } @@ -126,7 +126,7 @@ storeDiskdCreate(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, } /* Allocate a number */ f = storeDiskdDirMapBitAllocate(SD); - debug(81, 3) ("storeDiskdCreate: fileno %08X\n", f); + debug(79, 3) ("storeDiskdCreate: fileno %08X\n", f); CBDATA_INIT_TYPE_FREECB(storeIOState, storeDiskdIOFreeEntry); sio = cbdataAlloc(storeIOState); @@ -171,7 +171,7 @@ storeDiskdClose(SwapDir * SD, storeIOState * sio) { int x; diskdstate_t *diskdstate = sio->fsstate; - debug(81, 3) ("storeDiskdClose: dirno %d, fileno %08X\n", SD->index, + debug(79, 3) ("storeDiskdClose: dirno %d, fileno %08X\n", SD->index, sio->swap_filen); x = storeDiskdSend(_MQD_CLOSE, SD, @@ -195,12 +195,12 @@ storeDiskdRead(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t o off_t shm_offset; char *rbuf; diskdstate_t *diskdstate = sio->fsstate; - debug(81, 3) ("storeDiskdRead: dirno %d, fileno %08X\n", sio->swap_dirn, sio->swap_filen); + debug(79, 3) ("storeDiskdRead: dirno %d, fileno %08X\n", sio->swap_dirn, sio->swap_filen); assert(!diskdstate->flags.close_request); if (!cbdataReferenceValid(sio)) return; if (diskdstate->flags.reading) { - debug(81, 1) ("storeDiskdRead: already reading!\n"); + debug(79, 1) ("storeDiskdRead: already reading!\n"); return; } assert(sio->read.callback == NULL); @@ -234,7 +234,7 @@ storeDiskdWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t char *sbuf; off_t shm_offset; diskdstate_t *diskdstate = sio->fsstate; - debug(81, 3) ("storeDiskdWrite: dirno %d, fileno %08X\n", SD->index, sio->swap_filen); + debug(79, 3) ("storeDiskdWrite: dirno %d, fileno %08X\n", SD->index, sio->swap_filen); assert(!diskdstate->flags.close_request); if (!cbdataReferenceValid(sio)) { free_func(buf); @@ -268,7 +268,7 @@ storeDiskdUnlink(SwapDir * SD, StoreEntry * e) char *buf; diskdinfo_t *diskdinfo = SD->fsdata; - debug(81, 3) ("storeDiskdUnlink: dirno %d, fileno %08X\n", SD->index, + debug(79, 3) ("storeDiskdUnlink: dirno %d, fileno %08X\n", SD->index, e->swap_filen); storeDiskdDirReplRemove(e); storeDiskdDirMapBitReset(SD, e->swap_filen); @@ -304,7 +304,7 @@ storeDiskdOpenDone(diomsg * M) { storeIOState *sio = M->callback_data; statCounter.syscalls.disk.opens++; - debug(81, 3) ("storeDiskdOpenDone: dirno %d, fileno %08x status %d\n", + debug(79, 3) ("storeDiskdOpenDone: dirno %d, fileno %08x status %d\n", sio->swap_dirn, sio->swap_filen, M->status); if (M->status < 0) { sio->mode == O_RDONLY ? diskd_stats.open.fail++ : diskd_stats.create.fail++; @@ -319,7 +319,7 @@ storeDiskdCloseDone(diomsg * M) { storeIOState *sio = M->callback_data; statCounter.syscalls.disk.closes++; - debug(81, 3) ("storeDiskdCloseDone: dirno %d, fileno %08x status %d\n", + debug(79, 3) ("storeDiskdCloseDone: dirno %d, fileno %08x status %d\n", sio->swap_dirn, sio->swap_filen, M->status); if (M->status < 0) { diskd_stats.close.fail++; @@ -344,7 +344,7 @@ storeDiskdReadDone(diomsg * M) size_t len; statCounter.syscalls.disk.reads++; diskdstate->flags.reading = 0; - debug(81, 3) ("storeDiskdReadDone: dirno %d, fileno %08x status %d\n", + debug(79, 3) ("storeDiskdReadDone: dirno %d, fileno %08x status %d\n", sio->swap_dirn, sio->swap_filen, M->status); if (M->status < 0) { diskd_stats.read.fail++; @@ -377,7 +377,7 @@ storeDiskdWriteDone(diomsg * M) diskdstate_t *diskdstate = sio->fsstate; statCounter.syscalls.disk.writes++; diskdstate->flags.writing = 0; - debug(81, 3) ("storeDiskdWriteDone: dirno %d, fileno %08x status %d\n", + debug(79, 3) ("storeDiskdWriteDone: dirno %d, fileno %08x status %d\n", sio->swap_dirn, sio->swap_filen, M->status); if (M->status < 0) { diskd_stats.write.fail++; @@ -391,7 +391,7 @@ storeDiskdWriteDone(diomsg * M) static void storeDiskdUnlinkDone(diomsg * M) { - debug(81, 3) ("storeDiskdUnlinkDone: fileno %08x status %d\n", + debug(79, 3) ("storeDiskdUnlinkDone: fileno %08x status %d\n", M->id, M->status); statCounter.syscalls.disk.unlinks++; if (M->status < 0) @@ -425,7 +425,7 @@ storeDiskdHandle(diomsg * M) break; } } else { - debug(81, 3) ("storeDiskdHandle: Invalid callback_data %p\n", + debug(79, 3) ("storeDiskdHandle: Invalid callback_data %p\n", M->callback_data); /* * The read operation has its own callback. If we don't @@ -449,7 +449,7 @@ storeDiskdIOCallback(storeIOState * sio, int errflag) { void *cbdata; STIOCB *callback = sio->callback; - debug(81, 3) ("storeUfsIOCallback: errflag=%d\n", errflag); + debug(79, 3) ("storeUfsIOCallback: errflag=%d\n", errflag); sio->callback = NULL; if (cbdataReferenceValidDone(sio->callback_data, &cbdata)) callback(cbdata, errflag, sio); @@ -474,7 +474,7 @@ storeDiskdSend(int mtype, SwapDir * sd, int id, storeIOState * sio, int size, in M.id = id; M.seq_no = ++seq_no; if (M.seq_no < last_seq_no) - debug(81, 1) ("WARNING: sequencing out of order\n"); + debug(79, 1) ("WARNING: sequencing out of order\n"); x = msgsnd(diskdinfo->smsgid, &M, msg_snd_rcv_sz, IPC_NOWAIT); last_seq_no = M.seq_no; if (0 == x) { diff --git a/src/helper.cc b/src/helper.cc index a05d1bd01a..a3f05ff3c4 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -1,8 +1,8 @@ /* - * $Id: helper.cc,v 1.38 2002/05/15 19:08:34 wessels Exp $ + * $Id: helper.cc,v 1.39 2002/07/20 23:51:02 hno Exp $ * - * DEBUG: section 29 Helper process maintenance + * DEBUG: section 84 Helper process maintenance * AUTHOR: Harvest Derived? * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -80,7 +80,7 @@ helperOpenServers(helper * hlp) shortname = xstrdup(s + 1); else shortname = xstrdup(progname); - debug(29, 1) ("helperOpenServers: Starting %d '%s' processes\n", + debug(84, 1) ("helperOpenServers: Starting %d '%s' processes\n", hlp->n_to_start, shortname); procname = xmalloc(strlen(shortname) + 3); snprintf(procname, strlen(shortname) + 3, "(%s)", shortname); @@ -99,7 +99,7 @@ helperOpenServers(helper * hlp) &rfd, &wfd); if (x < 0) { - debug(29, 1) ("WARNING: Cannot run '%s' process.\n", progname); + debug(84, 1) ("WARNING: Cannot run '%s' process.\n", progname); continue; } hlp->n_running++; @@ -155,7 +155,7 @@ helperStatefulOpenServers(statefulhelper * hlp) shortname = xstrdup(s + 1); else shortname = xstrdup(progname); - debug(29, 1) ("helperStatefulOpenServers: Starting %d '%s' processes\n", + debug(84, 1) ("helperStatefulOpenServers: Starting %d '%s' processes\n", hlp->n_to_start, shortname); procname = xmalloc(strlen(shortname) + 3); snprintf(procname, strlen(shortname) + 3, "(%s)", shortname); @@ -174,7 +174,7 @@ helperStatefulOpenServers(statefulhelper * hlp) &rfd, &wfd); if (x < 0) { - debug(29, 1) ("WARNING: Cannot run '%s' process.\n", progname); + debug(84, 1) ("WARNING: Cannot run '%s' process.\n", progname); continue; } hlp->n_running++; @@ -223,7 +223,7 @@ helperSubmit(helper * hlp, const char *buf, HLPCB * callback, void *data) helper_request *r = memAllocate(MEM_HELPER_REQUEST); helper_server *srv; if (hlp == NULL) { - debug(29, 3) ("helperSubmit: hlp == NULL\n"); + debug(84, 3) ("helperSubmit: hlp == NULL\n"); callback(data, NULL); return; } @@ -234,7 +234,7 @@ helperSubmit(helper * hlp, const char *buf, HLPCB * callback, void *data) helperDispatch(srv, r); else Enqueue(hlp, r); - debug(29, 9) ("helperSubmit: %s\n", buf); + debug(84, 9) ("helperSubmit: %s\n", buf); } /* lastserver = "server last used as part of a deferred or reserved @@ -246,7 +246,7 @@ helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, v helper_stateful_request *r = memAllocate(MEM_HELPER_STATEFUL_REQUEST); helper_stateful_server *srv; if (hlp == NULL) { - debug(29, 3) ("helperStatefulSubmit: hlp == NULL\n"); + debug(84, 3) ("helperStatefulSubmit: hlp == NULL\n"); callback(data, 0, NULL); return; } @@ -260,7 +260,7 @@ helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, v r->placeholder = 1; } if ((buf != NULL) && lastserver) { - debug(29, 5) ("StatefulSubmit with lastserver %p\n", lastserver); + debug(84, 5) ("StatefulSubmit with lastserver %p\n", lastserver); /* the queue doesn't count for this assert because queued requests * have already gone through here and been tested. * It's legal to have deferred_requests == 0 and queue entries @@ -275,10 +275,10 @@ helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, v lastserver->deferred_requests--; } if (!(lastserver->request)) { - debug(29, 5) ("StatefulSubmit dispatching\n"); + debug(84, 5) ("StatefulSubmit dispatching\n"); helperStatefulDispatch(lastserver, r); } else { - debug(29, 5) ("StatefulSubmit queuing\n"); + debug(84, 5) ("StatefulSubmit queuing\n"); StatefulServerEnqueue(lastserver, r); } } else { @@ -287,7 +287,7 @@ helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, v } else StatefulEnqueue(hlp, r); } - debug(29, 9) ("helperStatefulSubmit: placeholder: '%d', buf '%s'.\n", r->placeholder, buf); + debug(84, 9) ("helperStatefulSubmit: placeholder: '%d', buf '%s'.\n", r->placeholder, buf); } helper_stateful_server * @@ -297,12 +297,12 @@ helperStatefulDefer(statefulhelper * hlp) dlink_node *n; helper_stateful_server *srv = NULL, *rv = NULL; if (hlp == NULL) { - debug(29, 3) ("helperStatefulReserve: hlp == NULL\n"); + debug(84, 3) ("helperStatefulReserve: hlp == NULL\n"); return NULL; } - debug(29, 5) ("helperStatefulDefer: Running servers %d.\n", hlp->n_running); + debug(84, 5) ("helperStatefulDefer: Running servers %d.\n", hlp->n_running); if (hlp->n_running == 0) { - debug(29, 1) ("helperStatefulDefer: No running servers!. \n"); + debug(84, 1) ("helperStatefulDefer: No running servers!. \n"); return NULL; } srv = StatefulGetFirstAvailable(hlp); @@ -323,7 +323,7 @@ helperStatefulDefer(statefulhelper * hlp) rv = srv; } if (rv == NULL) { - debug(29, 1) ("helperStatefulDefer: None available.\n"); + debug(84, 1) ("helperStatefulDefer: None available.\n"); return NULL; } /* consistency check: @@ -354,7 +354,7 @@ helperStatefulReset(helper_stateful_server * srv) r = srv->request; if (r != NULL) { /* reset attempt DURING an outstaning request */ - debug(29, 1) ("helperStatefulReset: RESET During request %s \n", + debug(84, 1) ("helperStatefulReset: RESET During request %s \n", hlp->id_name); srv->flags.busy = 0; srv->offset = 0; @@ -596,7 +596,7 @@ helperFree(helper * hlp) return; /* note, don't free hlp->name, it probably points to static memory */ if (hlp->queue.head) - debug(29, 0) ("WARNING: freeing %s helper with %d requests queued\n", + debug(84, 0) ("WARNING: freeing %s helper with %d requests queued\n", hlp->id_name, hlp->stats.queue_size); cbdataFree(hlp); } @@ -608,7 +608,7 @@ helperStatefulFree(statefulhelper * hlp) return; /* note, don't free hlp->name, it probably points to static memory */ if (hlp->queue.head) - debug(29, 0) ("WARNING: freeing %s helper with %d requests queued\n", + debug(84, 0) ("WARNING: freeing %s helper with %d requests queued\n", hlp->id_name, hlp->stats.queue_size); cbdataFree(hlp); } @@ -701,7 +701,7 @@ helperHandleRead(int fd, void *data) statCounter.syscalls.sock.reads++; len = FD_READ_METHOD(fd, srv->buf + srv->offset, srv->buf_sz - srv->offset); fd_bytes(fd, len, FD_READ); - debug(29, 5) ("helperHandleRead: %d bytes from %s #%d.\n", + debug(84, 5) ("helperHandleRead: %d bytes from %s #%d.\n", len, hlp->id_name, srv->index + 1); if (len <= 0) { if (len < 0) @@ -714,14 +714,14 @@ helperHandleRead(int fd, void *data) r = srv->request; if (r == NULL) { /* someone spoke without being spoken to */ - debug(29, 1) ("helperHandleRead: unexpected read from %s #%d, %d bytes\n", + debug(84, 1) ("helperHandleRead: unexpected read from %s #%d, %d bytes\n", hlp->id_name, srv->index + 1, len); srv->offset = 0; } else if ((t = strchr(srv->buf, '\n'))) { /* end of reply found */ HLPCB *callback; void *cbdata; - debug(29, 3) ("helperHandleRead: end of reply found\n"); + debug(84, 3) ("helperHandleRead: end of reply found\n"); *t = '\0'; callback = r->callback; r->callback = NULL; @@ -760,7 +760,7 @@ helperStatefulHandleRead(int fd, void *data) statCounter.syscalls.sock.reads++; len = FD_READ_METHOD(fd, srv->buf + srv->offset, srv->buf_sz - srv->offset); fd_bytes(fd, len, FD_READ); - debug(29, 5) ("helperStatefulHandleRead: %d bytes from %s #%d.\n", + debug(84, 5) ("helperStatefulHandleRead: %d bytes from %s #%d.\n", len, hlp->id_name, srv->index + 1); if (len <= 0) { if (len < 0) @@ -773,12 +773,12 @@ helperStatefulHandleRead(int fd, void *data) r = srv->request; if (r == NULL) { /* someone spoke without being spoken to */ - debug(29, 1) ("helperStatefulHandleRead: unexpected read from %s #%d, %d bytes\n", + debug(84, 1) ("helperStatefulHandleRead: unexpected read from %s #%d, %d bytes\n", hlp->id_name, srv->index + 1, len); srv->offset = 0; } else if ((t = strchr(srv->buf, '\n'))) { /* end of reply found */ - debug(29, 3) ("helperStatefulHandleRead: end of reply found\n"); + debug(84, 3) ("helperStatefulHandleRead: end of reply found\n"); *t = '\0'; if (cbdataReferenceValid(r->data)) { switch ((r->callback(r->data, srv, srv->buf))) { /*if non-zero reserve helper */ @@ -790,17 +790,17 @@ helperStatefulHandleRead(int fd, void *data) srv->flags.reserved = S_HELPER_FREE; if ((srv->parent->OnEmptyQueue != NULL) && (srv->data)) srv->parent->OnEmptyQueue(srv->data); - debug(29, 5) ("StatefulHandleRead: releasing %s #%d\n", hlp->id_name, srv->index + 1); + debug(84, 5) ("StatefulHandleRead: releasing %s #%d\n", hlp->id_name, srv->index + 1); } else { srv->flags.reserved = S_HELPER_DEFERRED; - debug(29, 5) ("StatefulHandleRead: outstanding deferred requests on %s #%d. reserving for deferred requests.\n", hlp->id_name, srv->index + 1); + debug(84, 5) ("StatefulHandleRead: outstanding deferred requests on %s #%d. reserving for deferred requests.\n", hlp->id_name, srv->index + 1); } break; case S_HELPER_RESERVE: /* 'pin' this helper for the caller */ if (!srv->queue.head) { assert(srv->deferred_requests == 0); srv->flags.reserved = S_HELPER_RESERVED; - debug(29, 5) ("StatefulHandleRead: reserving %s #%d\n", hlp->id_name, srv->index + 1); + debug(84, 5) ("StatefulHandleRead: reserving %s #%d\n", hlp->id_name, srv->index + 1); } else { fatal("StatefulHandleRead: Callback routine attempted to reserve a stateful helper with deferred requests. This can lead to deadlock.\n"); } @@ -812,14 +812,14 @@ helperStatefulHandleRead(int fd, void *data) srv->flags.reserved = S_HELPER_DEFERRED; srv->deferred_requests++; srv->stats.deferbycb++; - debug(29, 5) ("StatefulHandleRead: reserving %s #%d for deferred requests.\n", hlp->id_name, srv->index + 1); + debug(84, 5) ("StatefulHandleRead: reserving %s #%d for deferred requests.\n", hlp->id_name, srv->index + 1); break; default: fatal("helperStatefulHandleRead: unknown stateful helper callback result.\n"); } } else { - debug(29, 1) ("StatefulHandleRead: no callback data registered\n"); + debug(84, 1) ("StatefulHandleRead: no callback data registered\n"); } srv->flags.busy = 0; srv->offset = 0; @@ -975,7 +975,7 @@ StatefulGetFirstAvailable(statefulhelper * hlp) { dlink_node *n; helper_stateful_server *srv = NULL; - debug(29, 5) ("StatefulGetFirstAvailable: Running servers %d.\n", hlp->n_running); + debug(84, 5) ("StatefulGetFirstAvailable: Running servers %d.\n", hlp->n_running); if (hlp->n_running == 0) return NULL; for (n = hlp->servers.head; n != NULL; n = n->next) { @@ -990,7 +990,7 @@ StatefulGetFirstAvailable(statefulhelper * hlp) continue; return srv; } - debug(29, 5) ("StatefulGetFirstAvailable: None available.\n"); + debug(84, 5) ("StatefulGetFirstAvailable: None available.\n"); return NULL; } @@ -1000,7 +1000,7 @@ helperDispatch(helper_server * srv, helper_request * r) { helper *hlp = srv->parent; if (!cbdataReferenceValid(r->data)) { - debug(29, 1) ("helperDispatch: invalid callback data\n"); + debug(84, 1) ("helperDispatch: invalid callback data\n"); helperRequestFree(r); return; } @@ -1018,7 +1018,7 @@ helperDispatch(helper_server * srv, helper_request * r) COMM_SELECT_READ, helperHandleRead, srv, 0); - debug(29, 5) ("helperDispatch: Request sent to %s #%d, %d bytes\n", + debug(84, 5) ("helperDispatch: Request sent to %s #%d, %d bytes\n", hlp->id_name, srv->index + 1, (int) strlen(r->buf)); srv->stats.uses++; hlp->stats.requests++; @@ -1029,11 +1029,11 @@ helperStatefulDispatch(helper_stateful_server * srv, helper_stateful_request * r { statefulhelper *hlp = srv->parent; if (!cbdataReferenceValid(r->data)) { - debug(29, 1) ("helperStatefulDispatch: invalid callback data\n"); + debug(84, 1) ("helperStatefulDispatch: invalid callback data\n"); helperStatefulRequestFree(r); return; } - debug(29, 9) ("helperStatefulDispatch busying helper %s #%d\n", hlp->id_name, srv->index + 1); + debug(84, 9) ("helperStatefulDispatch busying helper %s #%d\n", hlp->id_name, srv->index + 1); if (r->placeholder == 1) { /* a callback is needed before this request can _use_ a helper. */ /* we don't care about releasing/deferring this helper. The request NEVER @@ -1071,7 +1071,7 @@ helperStatefulDispatch(helper_stateful_server * srv, helper_stateful_request * r COMM_SELECT_READ, helperStatefulHandleRead, srv, 0); - debug(29, 5) ("helperStatefulDispatch: Request sent to %s #%d, %d bytes\n", + debug(84, 5) ("helperStatefulDispatch: Request sent to %s #%d, %d bytes\n", hlp->id_name, srv->index + 1, (int) strlen(r->buf)); srv->stats.uses++; hlp->stats.requests++; diff --git a/src/mem.cc b/src/mem.cc index 1e07b2afc9..4905e4d29a 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -1,6 +1,6 @@ /* - * $Id: mem.cc,v 1.65 2002/04/13 23:07:50 hno Exp $ + * $Id: mem.cc,v 1.66 2002/07/20 23:51:03 hno Exp $ * * DEBUG: section 13 High Level Memory Pool Management * AUTHOR: Harvest Derived @@ -314,7 +314,7 @@ memConfigure(void) new_pool_limit = mem_unlimited_size; if (mem_idle_limit > new_pool_limit) - debug(63, 1) ("Shrinking idle mem pools to %.2f MB\n", toMB(new_pool_limit)); + debug(13, 1) ("Shrinking idle mem pools to %.2f MB\n", toMB(new_pool_limit)); memPoolSetIdleLimit(new_pool_limit); mem_idle_limit = new_pool_limit; } @@ -324,7 +324,7 @@ memInit(void) { int i; - debug(63, 1) ("Memory pools are '%s'; limit: %.2f MB\n", + debug(13, 1) ("Memory pools are '%s'; limit: %.2f MB\n", (Config.onoff.mem_pools ? "on" : "off"), toMB(mem_idle_limit)); /* set all pointers to null */ @@ -426,7 +426,7 @@ static void memPoolDescribe(const MemPool * pool) { assert(pool); - debug(63, 2) ("%-20s: %6d x %4d bytes = %5d KB\n", + debug(13, 2) ("%-20s: %6d x %4d bytes = %5d KB\n", pool->label, memPoolInUseCount(pool), pool->obj_size, toKB(pool->obj_size * pool->meter.inuse.level)); } @@ -441,7 +441,7 @@ memClean(void) memPoolClean(0); memPoolGetGlobalStats(&stats); if (stats.tot_items_inuse) - debug(63, 2) ("memCleanModule: %d items in %d chunks and %d pools are left dirty\n", stats.tot_items_inuse, + debug(13, 2) ("memCleanModule: %d items in %d chunks and %d pools are left dirty\n", stats.tot_items_inuse, stats.tot_chunks_inuse, stats.tot_pools_inuse); } diff --git a/src/redirect.cc b/src/redirect.cc index 6c2545d237..0e86b516b3 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -1,8 +1,8 @@ /* - * $Id: redirect.cc,v 1.90 2002/04/13 23:07:51 hno Exp $ + * $Id: redirect.cc,v 1.91 2002/07/20 23:51:03 hno Exp $ * - * DEBUG: section 29 Redirector + * DEBUG: section 61 Redirector * AUTHOR: Duane Wessels * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -57,7 +57,7 @@ redirectHandleReply(void *data, char *reply) redirectStateData *r = data; char *t; void *cbdata; - debug(29, 5) ("redirectHandleRead: {%s}\n", reply ? reply : ""); + debug(61, 5) ("redirectHandleRead: {%s}\n", reply ? reply : ""); if (reply) { if ((t = strchr(reply, ' '))) *t = '\0'; @@ -97,7 +97,7 @@ redirectStart(clientHttpRequest * http, RH * handler, void *data) char buf[8192]; assert(http); assert(handler); - debug(29, 5) ("redirectStart: '%s'\n", http->uri); + debug(61, 5) ("redirectStart: '%s'\n", http->uri); if (Config.Program.redirect == NULL) { handler(data, NULL); return; diff --git a/src/unlinkd.cc b/src/unlinkd.cc index 880d72a67c..edc935a260 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -1,6 +1,6 @@ /* - * $Id: unlinkd.cc,v 1.46 2002/04/04 23:59:26 hno Exp $ + * $Id: unlinkd.cc,v 1.47 2002/07/20 23:51:03 hno Exp $ * * DEBUG: section 12 Unlink Daemon * AUTHOR: Duane Wessels @@ -128,12 +128,12 @@ unlinkdUnlink(const char *path) buf[l++] = '\n'; x = write(unlinkd_wfd, buf, l); if (x < 0) { - debug(50, 1) ("unlinkdUnlink: write FD %d failed: %s\n", + debug(2, 1) ("unlinkdUnlink: write FD %d failed: %s\n", unlinkd_wfd, xstrerror()); safeunlink(path, 0); return; } else if (x != l) { - debug(50, 1) ("unlinkdUnlink: FD %d only wrote %d of %d bytes\n", + debug(2, 1) ("unlinkdUnlink: FD %d only wrote %d of %d bytes\n", unlinkd_wfd, x, l); safeunlink(path, 0); return; @@ -147,7 +147,7 @@ unlinkdClose(void) { if (unlinkd_wfd < 0) return; - debug(12, 1) ("Closing unlinkd pipe on FD %d\n", unlinkd_wfd); + debug(2, 1) ("Closing unlinkd pipe on FD %d\n", unlinkd_wfd); file_close(unlinkd_wfd); if (unlinkd_wfd != unlinkd_rfd) file_close(unlinkd_rfd); @@ -194,7 +194,7 @@ unlinkdInit(void) assert(fd_table[unlinkd_rfd].flags.nonblocking); if (FD_PIPE == fd_table[unlinkd_wfd].type) commUnsetNonBlocking(unlinkd_wfd); - debug(12, 1) ("Unlinkd pipe opened on FD %d\n", unlinkd_wfd); + debug(2, 1) ("Unlinkd pipe opened on FD %d\n", unlinkd_wfd); } #endif /* ndef UNLINK_DAEMON */