Mailing List Archive

r2511 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2008-02-18 12:54:30 +0100 (Mon, 18 Feb 2008)
New Revision: 2511

Modified:
trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
trunk/varnish-cache/bin/varnishd/mgt_param.c
Log:
Move kqueue debugging under diag_bitmap control


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2008-02-18 11:50:39 UTC (rev 2510)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2008-02-18 11:54:30 UTC (rev 2511)
@@ -207,23 +207,24 @@
return;
}
if (!vbit_test(vca_kqueue_bits, kp->ident)) {
- VSL(SLT_Debug, kp->ident,
- "KQ: not my fd %d, sp %p kev data %lu flags 0x%x%s",
- kp->ident, kp->udata, (unsigned long)kp->data, kp->flags,
- (kp->flags & EV_EOF) ? " EOF" : "");
+ if (params->diag_bitmap & 0x4)
+ VSL(SLT_Debug, kp->ident,
+ "KQ: not my fd %d, sp %p kev data %lu flags 0x%x%s",
+ kp->ident, kp->udata, (unsigned long)kp->data,
+ kp->flags, (kp->flags & EV_EOF) ? " EOF" : "");
return;
}
CAST_OBJ_NOTNULL(sp, kp->udata, SESS_MAGIC);
-#ifdef DIAGNOSTICS
- VSL(SLT_Debug, sp->id, "sp %p kev data %lu flags 0x%x%s",
- sp, (unsigned long)kp->data, kp->flags,
- (kp->flags & EV_EOF) ? " EOF" : "");
-#endif
+ if (params->diag_bitmap & 0x4)
+ VSL(SLT_Debug, sp->id, "sp %p kev data %lu flags 0x%x%s",
+ sp, (unsigned long)kp->data, kp->flags,
+ (kp->flags & EV_EOF) ? " EOF" : "");
spassert(sp->id == kp->ident);
spassert(sp->fd == sp->id || sp->fd == -1);
if (sp->fd == -1 || kp->fflags == 0) {
- VSL(SLT_Debug, sp->id, "%s(): got event 0x%04x on fd %d",
- __func__, kp->fflags, sp->fd);
+ if (params->diag_bitmap & 0x4)
+ VSL(SLT_Debug, sp->id, "KQ: got event 0x%04x on fd %d",
+ kp->fflags, sp->fd);
return;
}
if (kp->data > 0) {

Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c 2008-02-18 11:50:39 UTC (rev 2510)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2008-02-18 11:54:30 UTC (rev 2511)
@@ -640,6 +640,7 @@
"Bitmap controlling DIAGNOSTICS code:\n"
" 0x00000001 - CNT_Session states.\n"
" 0x00000002 - workspace debugging.\n"
+ " 0x00000004 - kqueue debugging.\n"
"Use 0x notation and do the bitor in your head :-)\n",
0,
"0", "bitmap" },