Commit 44f036f8 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Also dump workspaces in panic.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2979 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d1fc4cdc
......@@ -55,6 +55,32 @@ static struct vsb vsps, *vsp;
/*--------------------------------------------------------------------*/
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 @@ pan_http(const struct http *h)
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 @@ pan_object(const struct object *o)
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,6 +178,17 @@ pan_vcl(const struct VCL_conf *vcl)
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
......@@ -180,6 +219,11 @@ pan_sess(const struct sess *sp)
" 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment