r2979 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sun Jul 20 14:03:14 CEST 2008
Author: phk
Date: 2008-07-20 14:03:14 +0200 (Sun, 20 Jul 2008)
New Revision: 2979
Modified:
trunk/varnish-cache/bin/varnishd/cache_panic.c
Log:
Also dump workspaces in panic.
Modified: trunk/varnish-cache/bin/varnishd/cache_panic.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_panic.c 2008-07-20 11:44:29 UTC (rev 2978)
+++ trunk/varnish-cache/bin/varnishd/cache_panic.c 2008-07-20 12:03:14 UTC (rev 2979)
@@ -56,6 +56,32 @@
/*--------------------------------------------------------------------*/
static void
+pan_ws(const struct ws *ws, int indent)
+{
+
+ vsb_printf(vsp, "%*sws = %p { %s\n", indent, "",
+ ws, ws->overflow ? "overflow" : "");
+ vsb_printf(vsp, "%*sid = \"%s\",\n", indent + 2, "", ws->id);
+ vsb_printf(vsp, "%*s{s,f,r,e} = {%p,", indent + 2, "", ws->s);
+ if (ws->f > ws->s)
+ vsb_printf(vsp, ",+%d", ws->f - ws->s);
+ else
+ vsb_printf(vsp, ",%p", ws->f);
+ if (ws->r > ws->s)
+ vsb_printf(vsp, ",+%d", ws->r - ws->s);
+ else
+ vsb_printf(vsp, ",%p", ws->r);
+ if (ws->e > ws->s)
+ vsb_printf(vsp, ",+%d", ws->e - ws->s);
+ else
+ vsb_printf(vsp, ",%p", ws->e);
+ vsb_printf(vsp, "},\n");
+ vsb_printf(vsp, "%*s},\n", indent, "" );
+}
+
+/*--------------------------------------------------------------------*/
+
+static void
pan_backend(const struct backend *be)
{
@@ -105,6 +131,7 @@
int i;
vsb_printf(vsp, " http = {\n");
+ pan_ws(h->ws, 6);
if (h->nhd > HTTP_HDR_FIRST) {
vsb_printf(vsp, " hd = {\n");
for (i = HTTP_HDR_FIRST; i < h->nhd; ++i)
@@ -126,6 +153,7 @@
vsb_printf(vsp, " obj = %p {\n", o);
vsb_printf(vsp, " refcnt = %u, xid = %u,\n", o->refcnt, o->xid);
+ pan_ws(o->ws_o, 4);
pan_http(o->http);
vsb_printf(vsp, " len = %u,\n", o->len);
vsb_printf(vsp, " store = {\n");
@@ -150,9 +178,20 @@
vsb_printf(vsp, " },\n");
}
+
/*--------------------------------------------------------------------*/
static void
+pan_wrk(const struct worker *wrk)
+{
+
+ vsb_printf(vsp, " worker = %p {\n", wrk);
+ vsb_printf(vsp, " },\n");
+}
+
+/*--------------------------------------------------------------------*/
+
+static void
pan_sess(const struct sess *sp)
{
const char *stp;
@@ -180,6 +219,11 @@
" err_code = %d, err_reason = %s,\n", sp->err_code,
sp->err_reason ? sp->err_reason : "(null)");
+ pan_ws(sp->ws, 2);
+
+ if (sp->wrk != NULL)
+ pan_wrk(sp->wrk);
+
if (VALID_OBJ(sp->vcl, VCL_CONF_MAGIC))
pan_vcl(sp->vcl);
More information about the varnish-commit
mailing list