Panic: dump basic pool info

This is to chase a new case of the watchdog off the leash
parent 6cf1138f
......@@ -788,6 +788,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
if (bo != NULL)
VSL_Flush(bo->vsl, 0);
VMOD_Panic(pan_vsb);
pan_pool(pan_vsb);
} else {
VSB_cat(pan_vsb, "Feature short panic suppressed details.\n");
}
......
......@@ -239,6 +239,27 @@ pool_poolherder(void *priv)
NEEDLESS(return (NULL));
}
/*--------------------------------------------------------------------*/
void
pan_pool(struct vsb *vsb)
{
struct pool *pp;
VSB_printf(vsb, "pools = {\n");
VSB_indent(vsb, 2);
VTAILQ_FOREACH(pp, &pools, list) {
if (PAN_dump_struct(vsb, pp, POOL_MAGIC, "pool"))
continue;
VSB_printf(vsb, "nidle = %u,\n", pp->nidle);
VSB_printf(vsb, "nthr = %u,\n", pp->nthr);
VSB_printf(vsb, "lqueue = %u\n", pp->lqueue);
VSB_indent(vsb, -2);
VSB_printf(vsb, "},\n");
}
VSB_indent(vsb, -2);
VSB_printf(vsb, "},\n");
}
/*--------------------------------------------------------------------*/
void
......
......@@ -361,6 +361,7 @@ void Pool_Sumstat(const struct worker *w);
int Pool_TrySumstat(const struct worker *wrk);
void Pool_PurgeStat(unsigned nobj);
int Pool_Task_Any(struct pool_task *task, enum task_prio prio);
void pan_pool(struct vsb *);
/* cache_req.c */
struct req *Req_New(const struct worker *, struct sess *);
......
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