From 8bd00aca3279d0b271df4ea35247da55421c349d Mon Sep 17 00:00:00 2001 From: des Date: Tue, 30 Oct 2007 14:06:37 +0000 Subject: [PATCH] When DIAGNOSTICS is defined, log every step that each session goes through, along with some vital statistics, and flush the log regularly. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2215 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_center.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index fdd889a7..f92d74b9 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -877,7 +877,21 @@ CNT_Session(struct sess *sp) CHECK_OBJ_ORNULL(sp->backend, BACKEND_MAGIC); switch (sp->step) { -#define STEP(l,u) case STP_##u: done = cnt_##l(sp); break; +#ifdef DIAGNOSTICS +#define STEP(l,u) \ + case STP_##u: \ + WSL(sp->wrk, SLT_Debug, sp->id, \ + "cnt_%s(%p) xid %x obj %p vcl %p", \ + #l, sp, sp->xid, sp->obj, sp->vcl); \ + WSL_Flush(sp->wrk); \ + done = cnt_##l(sp); \ + break; +#else +#define STEP(l,u) \ + case STP_##u: \ + done = cnt_##l(sp); \ + break; +#endif #include "steps.h" #undef STEP default: INCOMPL(); -- 2.39.5