From: Anatoly Burakov Date: Fri, 22 Dec 2017 09:51:00 +0000 (+0000) Subject: test: add malloc stats dump command X-Git-Tag: spdx-start~240 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c4a0228fcd6474e171d24446cd3391769ad1dc16;p=dpdk.git test: add malloc stats dump command This can be useful for checking if an autotest leaks memory after its execution. Signed-off-by: Anatoly Burakov --- diff --git a/test/test/commands.c b/test/test/commands.c index 0473dac6ca..b7f60680b5 100644 --- a/test/test/commands.c +++ b/test/test/commands.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -163,13 +164,20 @@ static void cmd_dump_parsed(void *parsed_result, rte_eal_devargs_dump(stdout); else if (!strcmp(res->dump, "dump_log_types")) rte_log_dump(stdout); + else if (!strcmp(res->dump, "dump_malloc_stats")) + rte_malloc_dump_stats(stdout, NULL); } cmdline_parse_token_string_t cmd_dump_dump = TOKEN_STRING_INITIALIZER(struct cmd_dump_result, dump, - "dump_physmem#dump_memzone#" - "dump_struct_sizes#dump_ring#dump_mempool#" - "dump_devargs#dump_log_types"); + "dump_physmem#" + "dump_memzone#" + "dump_struct_sizes#" + "dump_ring#" + "dump_mempool#" + "dump_malloc_stats#" + "dump_devargs#" + "dump_log_types"); cmdline_parse_inst_t cmd_dump = { .f = cmd_dump_parsed, /* function to call */