From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 8C3F51B37A for ; Fri, 22 Dec 2017 10:51:03 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Dec 2017 01:51:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,440,1508828400"; d="scan'208";a="20381149" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 22 Dec 2017 01:51:01 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id vBM9p0Nn027065 for ; Fri, 22 Dec 2017 09:51:00 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id vBM9p0ef032737 for ; Fri, 22 Dec 2017 09:51:00 GMT Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id vBM9p0Lp032733 for dev@dpdk.org; Fri, 22 Dec 2017 09:51:00 GMT From: Anatoly Burakov To: dev@dpdk.org Date: Fri, 22 Dec 2017 09:51:00 +0000 Message-Id: X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] test: add malloc stats dump command X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 09:51:03 -0000 This can be useful for checking if an autotest leaks memory after its execution. Signed-off-by: Anatoly Burakov --- test/test/commands.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/test/commands.c b/test/test/commands.c index 4097a33..f49f7e8 100644 --- a/test/test/commands.c +++ b/test/test/commands.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -160,13 +161,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 */ -- 2.7.4