diff options
Diffstat (limited to 'src/vlib/cli.c')
-rw-r--r-- | src/vlib/cli.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/vlib/cli.c b/src/vlib/cli.c index a00ae6245f9..2187d2886fc 100644 --- a/src/vlib/cli.c +++ b/src/vlib/cli.c @@ -38,6 +38,7 @@ */ #include <vlib/vlib.h> +#include <vlib/stats/stats.h> #include <vlib/unix/unix.h> #include <vppinfra/callback.h> #include <vppinfra/cpu.h> @@ -753,13 +754,6 @@ vl_msg_pop_heap (void *oldheap) { } -void *vlib_stats_push_heap (void *) __attribute__ ((weak)); -void * -vlib_stats_push_heap (void *notused) -{ - return 0; -} - static clib_error_t * show_memory_usage (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) @@ -820,14 +814,14 @@ show_memory_usage (vlib_main_t * vm, } if (stats_segment) { - void *oldheap = vlib_stats_push_heap (0); + void *oldheap = vlib_stats_set_heap (0); was_enabled = clib_mem_trace_enable_disable (0); u8 *s_in_svm = format (0, "%U\n", format_clib_mem_heap, 0, 1); if (oldheap) clib_mem_set_heap (oldheap); u8 *s = vec_dup (s_in_svm); - oldheap = vlib_stats_push_heap (0); + oldheap = vlib_stats_set_heap (0); vec_free (s_in_svm); if (oldheap) { @@ -1038,7 +1032,7 @@ enable_disable_memory_trace (vlib_main_t * vm, /* Stats segment */ if (stats_segment) { - oldheap = vlib_stats_push_heap (0); + oldheap = vlib_stats_set_heap (); current_traced_heap = clib_mem_get_heap (); clib_mem_trace (stats_segment); /* We don't want to call vlib_stats_pop_heap... */ |