summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-02-28 10:42:47 +0100
committerMaria Matejka <mq@ucw.cz>2023-04-04 17:00:59 +0200
commitd9f0f4af7dc49c22232cc3be5e40866fc7d5dda7 (patch)
tree1b1972793ac880c067d9f89428f2fff1385f9199 /nest
parent8e6abea41eca5c18b03e46706cbfa2972085f954 (diff)
Resource dumps also write out block addresses
Diffstat (limited to 'nest')
-rw-r--r--nest/config.Y2
-rw-r--r--nest/locks.c2
-rw-r--r--nest/rt-attr.c2
-rw-r--r--nest/rt-table.c9
4 files changed, 11 insertions, 4 deletions
diff --git a/nest/config.Y b/nest/config.Y
index dc174b7b..8c3ee8ad 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -868,7 +868,7 @@ sym_args:
CF_CLI_HELP(DUMP, ..., [[Dump debugging information]])
CF_CLI(DUMP RESOURCES,,, [[Dump all allocated resource]])
-{ rdump(&root_pool); cli_msg(0, ""); } ;
+{ rdump(&root_pool, 0); cli_msg(0, ""); } ;
CF_CLI(DUMP SOCKETS,,, [[Dump open sockets]])
{ sk_dump_all(); cli_msg(0, ""); } ;
CF_CLI(DUMP EVENTS,,, [[Dump event log]])
diff --git a/nest/locks.c b/nest/locks.c
index fb245cdc..247d0c56 100644
--- a/nest/locks.c
+++ b/nest/locks.c
@@ -107,7 +107,7 @@ olock_free(resource *r)
}
static void
-olock_dump(resource *r)
+olock_dump(resource *r, unsigned indent UNUSED)
{
struct object_lock *l = (struct object_lock *) r;
static char *olock_states[] = { "free", "locked", "waiting", "event" };
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 761ec0d9..903926f6 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -550,7 +550,7 @@ ea_class_ref_free(resource *r)
}
static void
-ea_class_ref_dump(resource *r)
+ea_class_ref_dump(resource *r, unsigned indent UNUSED)
{
struct ea_class_ref *ref = SKIP_BACK(struct ea_class_ref, r, r);
debug("name \"%s\", type=%d\n", ref->class->name, ref->class->type);
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 83230802..6be47470 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -2801,12 +2801,19 @@ rt_free(resource *_r)
}
static void
-rt_res_dump(resource *_r)
+rt_res_dump(resource *_r, unsigned indent)
{
struct rtable_private *r = SKIP_BACK(struct rtable_private, r, _r);
debug("name \"%s\", addr_type=%s, rt_count=%u, use_count=%d\n",
r->name, net_label[r->addr_type], r->rt_count, r->use_count);
+
+ char x[32];
+ bsprintf(x, "%%%dspending export %%p\n", indent + 2);
+
+ node *n;
+ WALK_LIST(n, r->exporter.pending)
+ debug(x, "", n);
}
static struct resclass rt_class = {