mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Clarify resource dumps and include them in the main debugging dump.
This commit is contained in:
parent
3f2a21fd34
commit
5bc512aa3a
@ -150,13 +150,17 @@ lp_dump(resource *r)
|
|||||||
{
|
{
|
||||||
linpool *m = (linpool *) r;
|
linpool *m = (linpool *) r;
|
||||||
struct lp_chunk *c;
|
struct lp_chunk *c;
|
||||||
int cnt;
|
int cnt, cntl;
|
||||||
|
|
||||||
for(cnt=0, c=m->first; c; c=c->next, cnt++)
|
for(cnt=0, c=m->first; c; c=c->next, cnt++)
|
||||||
;
|
;
|
||||||
debug("(chunk=%d threshold=%d count=%d total=%d)\n",
|
for(cntl=0, c=m->first_large; c; c=c->next, cntl++)
|
||||||
|
;
|
||||||
|
debug("(chunk=%d threshold=%d count=%d+%d total=%d+%d)\n",
|
||||||
m->chunk_size,
|
m->chunk_size,
|
||||||
m->threshold,
|
m->threshold,
|
||||||
cnt,
|
cnt,
|
||||||
m->total);
|
cntl,
|
||||||
|
m->total,
|
||||||
|
m->total_large);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ pool *
|
|||||||
rp_new(pool *p, char *name)
|
rp_new(pool *p, char *name)
|
||||||
{
|
{
|
||||||
pool *z = ralloc(p, &pool_class);
|
pool *z = ralloc(p, &pool_class);
|
||||||
|
z->name = name;
|
||||||
init_list(&z->inside);
|
init_list(&z->inside);
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
@ -62,7 +63,7 @@ pool_dump(resource *P)
|
|||||||
pool *p = (pool *) P;
|
pool *p = (pool *) P;
|
||||||
resource *r;
|
resource *r;
|
||||||
|
|
||||||
debug(" %s\n", p->name);
|
debug("%s\n", p->name);
|
||||||
indent += 3;
|
indent += 3;
|
||||||
WALK_LIST(r, p->inside)
|
WALK_LIST(r, p->inside)
|
||||||
rdump(r);
|
rdump(r);
|
||||||
@ -93,7 +94,7 @@ rdump(void *res)
|
|||||||
debug(x, "", (int) r);
|
debug(x, "", (int) r);
|
||||||
if (r)
|
if (r)
|
||||||
{
|
{
|
||||||
debug("%-6s", r->class->name);
|
debug("%s ", r->class->name);
|
||||||
r->class->dump(r);
|
r->class->dump(r);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -95,9 +95,8 @@ proto_new(struct proto_config *c, unsigned size)
|
|||||||
static void
|
static void
|
||||||
proto_init_instance(struct proto *p)
|
proto_init_instance(struct proto *p)
|
||||||
{
|
{
|
||||||
struct proto_config *c = p->cf;
|
/* Here we cannot use p->cf->name since it won't survive reconfiguration */
|
||||||
|
p->pool = rp_new(proto_pool, p->proto->name);
|
||||||
p->pool = rp_new(proto_pool, c->name);
|
|
||||||
p->attn = ev_new(p->pool);
|
p->attn = ev_new(p->pool);
|
||||||
p->attn->data = p;
|
p->attn->data = p;
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ async_dump(void)
|
|||||||
{
|
{
|
||||||
debug("INTERNAL STATE DUMP\n\n");
|
debug("INTERNAL STATE DUMP\n\n");
|
||||||
|
|
||||||
|
rdump(&root_pool);
|
||||||
sk_dump_all();
|
sk_dump_all();
|
||||||
tm_dump_all();
|
tm_dump_all();
|
||||||
if_dump_all();
|
if_dump_all();
|
||||||
|
Loading…
Reference in New Issue
Block a user