From: Willy Tarreau Date: Wed, 1 Jul 2026 09:26:17 +0000 (+0200) Subject: CLEANUP: debug/trace: remote "debug dev trace" when USE_TRACE is not set X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/virtual_hosts.html?a=commitdiff_plain;h=19d48c3d34eb1d4c0dca02a0d864b4fea2fc7042;p=haproxy.git CLEANUP: debug/trace: remote "debug dev trace" when USE_TRACE is not set The functions associated with this command were already subject to DEBUG_DEV, let's also add USE_TRACE for them to be defined. This saves 8kB. --- diff --git a/src/debug.c b/src/debug.c index ebc251a7f..e5c90580a 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1861,7 +1861,7 @@ static int debug_parse_cli_sched(char **args, char *payload, struct appctx *appc return cli_err(appctx, "Not enough memory"); } -#if defined(DEBUG_DEV) +#if defined(DEBUG_DEV) && defined(USE_TRACE) /* All of this is for "trace dbg" */ static struct trace_source trace_dbg __read_mostly = { @@ -3090,7 +3090,7 @@ static struct cli_kw_list cli_kws = {{ },{ {{ "debug", "dev", "sym", NULL }, "debug dev sym : resolve symbol address", debug_parse_cli_sym, NULL, NULL, NULL, ACCESS_EXPERT }, {{ "debug", "dev", "task", NULL }, "debug dev task [wake|expire|kill] : show/wake/expire/kill task/tasklet", debug_parse_cli_task, NULL, NULL, NULL, ACCESS_EXPERT }, {{ "debug", "dev", "tkill", NULL }, "debug dev tkill [thr] [sig] : send signal to thread", debug_parse_cli_tkill, NULL, NULL, NULL, ACCESS_EXPERT }, -#if defined(DEBUG_DEV) +#if defined(DEBUG_DEV) && defined(USE_TRACE) {{ "debug", "dev", "trace", NULL }, "debug dev trace [nbthr] : flood traces from that many threads", debug_parse_cli_trace, NULL, NULL, NULL, ACCESS_EXPERT }, #endif {{ "debug", "dev", "warn", NULL }, "debug dev warn : call WARN_ON() and possibly crash", debug_parse_cli_warn, NULL, NULL, NULL, ACCESS_EXPERT },