]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: enable both DEBUG_STRICT and DEBUG_MEMORY_POOLS by default
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2022 16:50:37 +0000 (17:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2022 17:14:49 +0000 (18:14 +0100)
The first one will enable all currently deployed BUG_ON() checks. These
ones are safe from a performance perspective and from a reliability
perspective. New ones may be added later with different categories
(hot path, detection of uncertain events, etc).

DEBUG_MEMORY_POOLS enables the "tag" pool debugging option by default,
so that pools may be better traced in dumps. This one alone results in
almost imperceptible performance difference, and 8 extra bytes per
allocated object.

Both options are safe for production use (they're among those enabled
all the time on haproxy.org) and allow to produce much more trustable
bug reports which should save a few round trips with the reporters.

Makefile

index b97bbf5c9fc7465259b2fa77e33fedaaa2d2c2e4..212cb55a34e9648203d3d9f005744cef140c2d37 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -258,7 +258,7 @@ SMALL_OPTS =
 # DEBUG_NO_POOLS, DEBUG_FAIL_ALLOC, DEBUG_STRICT_NOCRASH, DEBUG_HPACK,
 # DEBUG_AUTH, DEBUG_SPOE, DEBUG_UAF, DEBUG_THREAD, DEBUG_STRICT, DEBUG_DEV,
 # DEBUG_TASK, DEBUG_MEMORY_POOLS, DEBUG_POOL_TRACING.
-DEBUG =
+DEBUG = -DDEBUG_STRICT -DDEBUG_MEMORY_POOLS
 
 #### Trace options
 # Use TRACE=1 to trace function calls to file "trace.out" or to stderr if not