From e6987e96b6ee50698f02aa97c2b7dfbbfbaf5287 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 7 Dec 2021 18:11:22 +0300 Subject: [PATCH] VTY: enable talloc introspection for OTC_GLOBAL Change-Id: I831722174ecbac7f2d53f2427ba7e2615fa28c8a --- src/vty/talloc_ctx_vty.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vty/talloc_ctx_vty.c b/src/vty/talloc_ctx_vty.c index 396647872..206d049e6 100644 --- a/src/vty/talloc_ctx_vty.c +++ b/src/vty/talloc_ctx_vty.c @@ -151,6 +151,8 @@ static void talloc_ctx_walk(const char *ctx, const char *depth, /* Determine a context for report */ if (!strncmp(ctx, "app", 3)) talloc_ctx = host.app_info->tall_ctx; + else if (!strcmp(ctx, "global")) + talloc_ctx = OTC_GLOBAL; else if (!strncmp(ctx, "all", 3)) talloc_ctx = NULL; @@ -167,11 +169,12 @@ static void talloc_ctx_walk(const char *ctx, const char *depth, } #define BASE_CMD_STR \ - "show talloc-context (application|all) (full|brief|DEPTH)" + "show talloc-context (application|global|all) (full|brief|DEPTH)" #define BASE_CMD_DESCR \ SHOW_STR "Show talloc memory hierarchy\n" \ "Application's context\n" \ + "Global context (OTC_GLOBAL)\n" \ "All contexts, if NULL-context tracking is enabled\n" \ "Display a full talloc memory hierarchy\n" \ "Display a brief talloc memory hierarchy\n" \