summaryrefslogtreecommitdiffstats
path: root/src/vlib/cli.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-07-02 21:33:31 +0200
committerDamjan Marion <damarion@cisco.com>2018-07-02 21:33:31 +0200
commit926b564d650700213f40b03394fdb12e45496246 (patch)
tree76a53cf41b0912397cbb5d8231598e267c5f5494 /src/vlib/cli.c
parentb361076e24e02243605a681b96aa65e9b5e27bfb (diff)
Add per-numa page allocation info to 'show memory'
Change-Id: I64e4e3d68c0f3958323f30b12a26cfaafa8bad85 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/cli.c')
-rw-r--r--src/vlib/cli.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vlib/cli.c b/src/vlib/cli.c
index ca8d2abc999..1692ad82672 100644
--- a/src/vlib/cli.c
+++ b/src/vlib/cli.c
@@ -745,8 +745,13 @@ show_memory_usage (vlib_main_t * vm,
/* *INDENT-OFF* */
foreach_vlib_main (
({
- vlib_cli_output (vm, "Thread %d %v\n", index, vlib_worker_threads[index].name);
- vlib_cli_output (vm, "%U\n", format_mheap, clib_per_cpu_mheaps[index], verbose);
+ mheap_t *h = mheap_header (clib_per_cpu_mheaps[index]);
+ vlib_cli_output (vm, "%sThread %d %v\n", index ? "\n":"", index,
+ vlib_worker_threads[index].name);
+ vlib_cli_output (vm, " %U\n", format_page_map, pointer_to_uword (h) -
+ h->vm_alloc_offset_from_header,
+ h->vm_alloc_size);
+ vlib_cli_output (vm, " %U\n", format_mheap, clib_per_cpu_mheaps[index], verbose);
index++;
}));
/* *INDENT-ON* */