[master] 26886ef Add some minimal debugging for fetch/deliver processors for a start
Nils Goroll
nils.goroll at uplex.de
Mon Oct 30 12:00:11 UTC 2017
commit 26886ef5c50e6fff0e77cde04ff4671d0d4c54f3
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Oct 30 12:58:26 2017 +0100
Add some minimal debugging for fetch/deliver processors for a start
diff --git a/bin/varnishd/cache/cache_deliver_proc.c b/bin/varnishd/cache/cache_deliver_proc.c
index 3a5d6ba..2221c89 100644
--- a/bin/varnishd/cache/cache_deliver_proc.c
+++ b/bin/varnishd/cache/cache_deliver_proc.c
@@ -85,6 +85,9 @@ VDP_push(struct req *req, const struct vdp *vdp, void *priv, int bottom)
AN(vdp->name);
AN(vdp->func);
+ if (DO_DEBUG(DBG_PROCESSORS))
+ VSLb(req->vsl, SLT_Debug, "VDP_push(%s)", vdp->name);
+
vdpe = WS_Alloc(req->ws, sizeof *vdpe);
if (vdpe == NULL)
return;
diff --git a/bin/varnishd/cache/cache_fetch_proc.c b/bin/varnishd/cache/cache_fetch_proc.c
index 7d9bf5c..84b3abb 100644
--- a/bin/varnishd/cache/cache_fetch_proc.c
+++ b/bin/varnishd/cache/cache_fetch_proc.c
@@ -141,6 +141,9 @@ VFP_Open(struct vfp_ctx *vc)
VTAILQ_FOREACH_REVERSE(vfe, &vc->vfp, vfp_entry_s, list) {
if (vfe->vfp->init == NULL)
continue;
+ if (DO_DEBUG(DBG_PROCESSORS))
+ VSLb(vc->wrk->vsl, SLT_Debug, "VFP_Open(%s)",
+ vfe->vfp->name);
vfe->closed = vfe->vfp->init(vc, vfe);
if (vfe->closed != VFP_OK && vfe->closed != VFP_NULL) {
(void)VFP_Error(vc, "Fetch filter %s failed to open",
diff --git a/include/tbl/debug_bits.h b/include/tbl/debug_bits.h
index 50e4839..3579a5d 100644
--- a/include/tbl/debug_bits.h
+++ b/include/tbl/debug_bits.h
@@ -48,6 +48,7 @@ DEBUG_BIT(DROP_POOLS, drop_pools, "Drop thread pools (testing)")
DEBUG_BIT(SLOW_ACCEPTOR, slow_acceptor, "Slow down Acceptor")
DEBUG_BIT(H2_NOCHECK, h2_nocheck, "Disable various H2 checks")
DEBUG_BIT(VMOD_SO_KEEP, vmod_so_keep, "Keep copied VMOD libraries")
+DEBUG_BIT(PROCESSORS, processors, "Fetch/Deliver processors")
#undef DEBUG_BIT
/*lint -restore */
More information about the varnish-commit
mailing list