r2510 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Feb 18 12:50:39 CET 2008


Author: phk
Date: 2008-02-18 12:50:39 +0100 (Mon, 18 Feb 2008)
New Revision: 2510

Modified:
   trunk/varnish-cache/bin/varnishd/cache_ws.c
   trunk/varnish-cache/bin/varnishd/mgt_param.c
Log:
Move the workspace debugging under diag_bitmap control.


Modified: trunk/varnish-cache/bin/varnishd/cache_ws.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_ws.c	2008-02-18 11:47:55 UTC (rev 2509)
+++ trunk/varnish-cache/bin/varnishd/cache_ws.c	2008-02-18 11:50:39 UTC (rev 2510)
@@ -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)

Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c	2008-02-18 11:47:55 UTC (rev 2509)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c	2008-02-18 11:50:39 UTC (rev 2510)
@@ -639,6 +639,7 @@
 	{ "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" },




More information about the varnish-commit mailing list