From 11cf7d96b5adbde7eed922f574f051d0180f2a2d Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 18 Feb 2008 11:50:39 +0000 Subject: [PATCH] Move the workspace debugging under diag_bitmap control. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2510 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_ws.c | 10 +++++----- varnish-cache/bin/varnishd/mgt_param.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_ws.c b/varnish-cache/bin/varnishd/cache_ws.c index 728b5e75..39c3f488 100644 --- a/varnish-cache/bin/varnishd/cache_ws.c +++ b/varnish-cache/bin/varnishd/cache_ws.c @@ -48,11 +48,11 @@ #include "cache.h" /* Enable this to get detailed logging of WS usage */ -#ifdef DIAGNOSTICS0 -# define WS_DEBUG(fmt, ...) VSL(SLT_Debug, 0, fmt, __VA_ARGS__) -#else -# define WS_DEBUG(fmt, ...) /* nothing */ -#endif +#define WS_DEBUG(fmt, ...) \ + do { \ + if (params->diag_bitmap & 0x2) \ + VSL(SLT_Debug, 0, fmt, __VA_ARGS__); \ + } while (0) void WS_Assert(const struct ws *ws) diff --git a/varnish-cache/bin/varnishd/mgt_param.c b/varnish-cache/bin/varnishd/mgt_param.c index b96ae091..88593f1c 100644 --- a/varnish-cache/bin/varnishd/mgt_param.c +++ b/varnish-cache/bin/varnishd/mgt_param.c @@ -639,6 +639,7 @@ static const struct parspec parspec[] = { { "diag_bitmap", tweak_diag_bitmap, 0, 0, 0, "Bitmap controlling DIAGNOSTICS code:\n" " 0x00000001 - CNT_Session states.\n" + " 0x00000002 - workspace debugging.\n" "Use 0x notation and do the bitor in your head :-)\n", 0, "0", "bitmap" }, -- 2.39.5