From 6d60a7aca85da3245167ddf0a15c6611249bbec6 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Fri, 28 Jan 2022 12:05:43 +0000 Subject: [PATCH] Bug 5194: Remove all unused debug sections (#969) ... that we can find quickly. Naming/documenting debugging sections is a good idea, but that should not be done in every source code file that relies on that section. We cannot remove all such DEBUG: declarations without developing a proper way to name/document sections, but we can (and, given Bug 5194 existence, probably should) remove the unused ones -- their removal does not remove any immediately usable info. Bug 5194 report was specific to Section 56: Folks misinterpret section 56 "HTTP Message Body" title as promising to dump message bodies to cache.log, which is not a functionality that should be driven by a debugging section. Currently, Squid lacks such functionality. --- doc/debug-sections.txt | 5 ----- src/HttpBody.cc | 2 -- src/MemBuf.cc | 2 -- src/StatHist.cc | 2 -- src/String.cc | 2 -- src/mem/Pool.cc | 1 - src/mem/PoolChunked.cc | 1 - src/mem/PoolMalloc.cc | 1 - 8 files changed, 16 deletions(-) diff --git a/doc/debug-sections.txt b/doc/debug-sections.txt index a91351d9eb..c3f48fb489 100644 --- a/doc/debug-sections.txt +++ b/doc/debug-sections.txt @@ -107,17 +107,12 @@ section 53 Radix Tree data structure implementation section 54 Interprocess Communication section 54 Windows Interprocess Communication section 55 HTTP Header -section 56 HTTP Message Body section 57 HTTP Status-line section 58 HTTP Reply (Response) -section 59 auto-growing Memory Buffer with printf section 61 Redirector -section 62 Generic Histogram -section 63 Low Level Memory Pool Management section 64 HTTP Range Header section 65 HTTP Cache Control Header section 66 HTTP Header Tools -section 67 String section 68 HTTP Content-Range Header section 70 Cache Digest section 71 Store Digest Manager diff --git a/src/HttpBody.cc b/src/HttpBody.cc index adfff9d9f5..cf5952eaa9 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -6,8 +6,6 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ -/* DEBUG: section 56 HTTP Message Body */ - #include "squid.h" #include "base/Packable.h" #include "HttpBody.h" diff --git a/src/MemBuf.cc b/src/MemBuf.cc index 570eb97192..2b96b83f9d 100644 --- a/src/MemBuf.cc +++ b/src/MemBuf.cc @@ -6,8 +6,6 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ -/* DEBUG: section 59 auto-growing Memory Buffer with printf */ - /** \verbatim * Rationale: diff --git a/src/StatHist.cc b/src/StatHist.cc index 91c9991217..d439106cf6 100644 --- a/src/StatHist.cc +++ b/src/StatHist.cc @@ -6,8 +6,6 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ -/* DEBUG: section 62 Generic Histogram */ - #include "squid.h" #include "StatHist.h" diff --git a/src/String.cc b/src/String.cc index f3805d374c..98b13336a5 100644 --- a/src/String.cc +++ b/src/String.cc @@ -6,8 +6,6 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ -/* DEBUG: section 67 String */ - #include "squid.h" #include "base/TextException.h" #include "mgr/Registration.h" diff --git a/src/mem/Pool.cc b/src/mem/Pool.cc index 566cb2fd25..6ec649c538 100644 --- a/src/mem/Pool.cc +++ b/src/mem/Pool.cc @@ -7,7 +7,6 @@ */ /* - * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov, Andres Kroonmaa, Robert Collins */ diff --git a/src/mem/PoolChunked.cc b/src/mem/PoolChunked.cc index 812cbfa579..8e5bc85e2b 100644 --- a/src/mem/PoolChunked.cc +++ b/src/mem/PoolChunked.cc @@ -7,7 +7,6 @@ */ /* - * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov, Andres Kroonmaa, Robert Collins */ diff --git a/src/mem/PoolMalloc.cc b/src/mem/PoolMalloc.cc index 2a6ac80f18..14a5b7dd39 100644 --- a/src/mem/PoolMalloc.cc +++ b/src/mem/PoolMalloc.cc @@ -7,7 +7,6 @@ */ /* - * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov, Andres Kroonmaa, Robert Collins, Henrik Nordstrom */ -- 2.47.2