From: Alex Rousskov Date: Mon, 30 Dec 2013 23:58:33 +0000 (-0700) Subject: Do not use HERE in new or changed debugs() statements. X-Git-Tag: SQUID_3_5_0_1~444^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=539283dfc7741992967c73b5933bf55d932f915e;p=thirdparty%2Fsquid.git Do not use HERE in new or changed debugs() statements. Polished StoreEntry creation/destruction debugging. --- diff --git a/src/CollapsedForwarding.cc b/src/CollapsedForwarding.cc index e743fb4d19..fc48fa94fa 100644 --- a/src/CollapsedForwarding.cc +++ b/src/CollapsedForwarding.cc @@ -119,7 +119,7 @@ void CollapsedForwarding::HandleNotification(const Ipc::TypedMsgHdr &msg) { const int from = msg.getInt(); - debugs(17, 7, HERE << "from " << from); + debugs(17, 7, "from " << from); assert(queue.get()); queue->clearReaderSignal(from); HandleNewData("after notification"); diff --git a/src/MemStore.cc b/src/MemStore.cc index 623794ee23..5e27e5a6f8 100644 --- a/src/MemStore.cc +++ b/src/MemStore.cc @@ -441,7 +441,7 @@ MemStore::shouldCache(const StoreEntry &e) const // objects of unknown size are not allowed into memory cache, for now if (expectedSize < 0) { - debugs(20, 5, HERE << "Unknown expected size: " << e); + debugs(20, 5, "Unknown expected size: " << e); return false; } @@ -460,7 +460,7 @@ MemStore::shouldCache(const StoreEntry &e) const } if (EBIT_TEST(e.flags, ENTRY_SPECIAL)) { - debugs(20, 5, HERE << "Not mem-caching ENTRY_SPECIAL " << e); + debugs(20, 5, "Not mem-caching ENTRY_SPECIAL " << e); return false; } diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 6858407086..c29e5ea91e 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1608,7 +1608,7 @@ clientReplyContext::identifyFoundObject(StoreEntry *newEntry) if (http->redirect.status) { /** \li If redirection status is True force this to be a MISS */ - debugs(85, 3, HERE << "REDIRECT status forced StoreEntry to NULL (no body on 3XX responses) " << *e); + debugs(85, 3, "REDIRECT status forced StoreEntry to NULL (no body on 3XX responses) " << *e); forgetHit(); http->logType = LOG_TCP_REDIRECT; doGetMoreData(); diff --git a/src/fs/rock/RockRebuild.cc b/src/fs/rock/RockRebuild.cc index 0457cabae0..b7f57bf565 100644 --- a/src/fs/rock/RockRebuild.cc +++ b/src/fs/rock/RockRebuild.cc @@ -190,7 +190,7 @@ Rock::Rebuild::steps() void Rock::Rebuild::loadingSteps() { - debugs(47,5, HERE << sd->index << " slot " << loadingPos << " at " << + debugs(47,5, sd->index << " slot " << loadingPos << " at " << dbOffset << " <= " << dbSize); // Balance our desire to maximize the number of entries processed at once @@ -225,7 +225,7 @@ Rock::Rebuild::loadingSteps() void Rock::Rebuild::loadOneSlot() { - debugs(47,5, HERE << sd->index << " slot " << loadingPos << " at " << + debugs(47,5, sd->index << " slot " << loadingPos << " at " << dbOffset << " <= " << dbSize); ++counts.scancount; @@ -385,7 +385,7 @@ Rock::Rebuild::swanSong() void Rock::Rebuild::failure(const char *msg, int errNo) { - debugs(47,5, HERE << sd->index << " slot " << loadingPos << " at " << + debugs(47,5, sd->index << " slot " << loadingPos << " at " << dbOffset << " <= " << dbSize); if (errNo) diff --git a/src/ipc/Queue.cc b/src/ipc/Queue.cc index 120cc5a849..0e1cfedbdd 100644 --- a/src/ipc/Queue.cc +++ b/src/ipc/Queue.cc @@ -135,7 +135,7 @@ void Ipc::BaseMultiQueue::clearReaderSignal(const int remoteProcessId) { QueueReader &reader = localReader(); - debugs(54, 7, HERE << "reader: " << reader.id); + debugs(54, 7, "reader: " << reader.id); reader.clearSignal(); @@ -205,7 +205,7 @@ Ipc::FewToFewBiQueue::FewToFewBiQueue(const String &id, const Group aLocalGroup, Must(queues->theCapacity == metadata->theGroupASize * metadata->theGroupBSize * 2); Must(readers->theCapacity == metadata->theGroupASize + metadata->theGroupBSize); - debugs(54, 7, HERE << "queue " << id << " reader: " << localReader().id); + debugs(54, 7, "queue " << id << " reader: " << localReader().id); } int @@ -344,7 +344,7 @@ Ipc::MultiQueue::MultiQueue(const String &id, const int localProcessId): Must(queues->theCapacity == metadata->theProcessCount * metadata->theProcessCount); Must(readers->theCapacity == metadata->theProcessCount); - debugs(54, 7, HERE << "queue " << id << " reader: " << localReader().id); + debugs(54, 7, "queue " << id << " reader: " << localReader().id); } bool diff --git a/src/ipc/StoreMap.cc b/src/ipc/StoreMap.cc index 8accc31b2f..a70cb8372e 100644 --- a/src/ipc/StoreMap.cc +++ b/src/ipc/StoreMap.cc @@ -325,7 +325,7 @@ Ipc::StoreMap::openForReadingAt(const sfileno fileno) if (s.waitingToBeFreed) { s.lock.unlockShared(); - debugs(54, 7, HERE << "cannot open marked entry " << fileno << + debugs(54, 7, "cannot open marked entry " << fileno << " for reading " << path); return NULL; } diff --git a/src/store.cc b/src/store.cc index 3373b13557..c0ed2b9bbf 100644 --- a/src/store.cc +++ b/src/store.cc @@ -392,11 +392,12 @@ StoreEntry::StoreEntry() : swap_status(SWAPOUT_NONE), lock_count(0) { - debugs(20, 3, HERE << "new StoreEntry " << this); + debugs(20, 5, "StoreEntry constructed, this=" << this); } StoreEntry::~StoreEntry() { + debugs(20, 5, "StoreEntry destructed, this=" << this); } #if USE_ADAPTATION diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index dd7f55828a..a80bc9d578 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -344,7 +344,7 @@ storeRebuildParseEntry(MemBuf &buf, StoreEntry &tmpe, cache_key *key, // TODO: consume parsed metadata? - debugs(47,7, HERE << "successful swap meta unpacking; swap_file_sz=" << tmpe.swap_file_sz); + debugs(47,7, "successful swap meta unpacking; swap_file_sz=" << tmpe.swap_file_sz); memset(key, '\0', SQUID_MD5_DIGEST_LENGTH); InitStoreEntry visitor(&tmpe, key); diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 6ea5123788..ceea8adca9 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -381,7 +381,7 @@ StoreEntry::mayStartSwapOut() // if we swapped out already, do not start over if (swap_status == SWAPOUT_DONE) { - debugs(20, 3, HERE << "already did"); + debugs(20, 3, "already did"); decision = MemObject::SwapOut::swImpossible; return false; }