]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Clarify resource dumps and include them in the main debugging dump.
authorMartin Mares <mj@ucw.cz>
Mon, 29 Mar 1999 20:14:33 +0000 (20:14 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 29 Mar 1999 20:14:33 +0000 (20:14 +0000)
lib/mempool.c
lib/resource.c
nest/proto.c
sysdep/unix/main.c

index 49e6e900c47504baccf04e6597cf13bbc8641844..9319859d9ddf3edfe9805f3d29f48857eb82630e 100644 (file)
@@ -150,13 +150,17 @@ lp_dump(resource *r)
 {
   linpool *m = (linpool *) r;
   struct lp_chunk *c;
-  int cnt;
+  int cnt, cntl;
 
   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->threshold,
        cnt,
-       m->total);
+       cntl,
+       m->total,
+       m->total_large);
 }
index f2a0c7739078e25fa20bb6bf9105405b91807d95..ceaa0add870c39dbf72549e8d6ef8f6d9490d4e0 100644 (file)
@@ -37,6 +37,7 @@ pool *
 rp_new(pool *p, char *name)
 {
   pool *z = ralloc(p, &pool_class);
+  z->name = name;
   init_list(&z->inside);
   return z;
 }
@@ -62,7 +63,7 @@ pool_dump(resource *P)
   pool *p = (pool *) P;
   resource *r;
 
-  debug(" %s\n", p->name);
+  debug("%s\n", p->name);
   indent += 3;
   WALK_LIST(r, p->inside)
     rdump(r);
@@ -93,7 +94,7 @@ rdump(void *res)
   debug(x, "", (int) r);
   if (r)
     {
-      debug("%-6s", r->class->name);
+      debug("%", r->class->name);
       r->class->dump(r);
     }
   else
index 450128e34ce30c4a6c925e7d2d1379a8d87b1693..f230c8ef40b090fcc2a7de09bce9891f0006d5e7 100644 (file)
@@ -95,9 +95,8 @@ proto_new(struct proto_config *c, unsigned size)
 static void
 proto_init_instance(struct proto *p)
 {
-  struct proto_config *c = p->cf;
-
-  p->pool = rp_new(proto_pool, c->name);
+  /* Here we cannot use p->cf->name since it won't survive reconfiguration */
+  p->pool = rp_new(proto_pool, p->proto->name);
   p->attn = ev_new(p->pool);
   p->attn->data = p;
 }
index 5f260caa9bd81c544f8fa2f853b8934730b86895..356070f1408d27251bfe59dd00b7a0d0db44a3b3 100644 (file)
@@ -38,6 +38,7 @@ async_dump(void)
 {
   debug("INTERNAL STATE DUMP\n\n");
 
+  rdump(&root_pool);
   sk_dump_all();
   tm_dump_all();
   if_dump_all();