]> err.no Git - varnish/commitdiff
Move the workspace debugging under diag_bitmap control.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 18 Feb 2008 11:50:39 +0000 (11:50 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 18 Feb 2008 11:50:39 +0000 (11:50 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2510 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_ws.c
varnish-cache/bin/varnishd/mgt_param.c

index 728b5e75a72d999e94c2149b32e3bbf6a88db023..39c3f48883f556524622a7f2694b910e3d1f2187 100644 (file)
 #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)
index b96ae091831abab0dedaf488f14ce0f5644a2d17..88593f1c273e4b744e48ff2d9ce19abf0cb21a2a 100644 (file)
@@ -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" },