app/testpmd: add trace dump command
Checks
Commit Message
The "dump_trace" CLI command is added to trigger
saving the trace dumps to the trace directory.
The tracing data are saved according to the EAL configuration
(explicit --trace-dir EAL command line parameter alters
the target folder to save). The result dump folder gets the name
like rte-YYYY-MM-DD-xx-HH-MM-SS format.
This command is useful to get the trace date without exiting
testpmd application and to get the multiple dumps to observe
the situation in dynamics.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
app/test-pmd/cmdline.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -8372,6 +8372,8 @@ static void cmd_dump_parsed(void *parsed_result,
rte_lcore_dump(stdout);
else if (!strcmp(res->dump, "dump_log_types"))
rte_log_dump(stdout);
+ else if (!strcmp(res->dump, "dump_trace"))
+ rte_trace_save();
}
static cmdline_parse_token_string_t cmd_dump_dump =
@@ -8384,7 +8386,8 @@ static cmdline_parse_token_string_t cmd_dump_dump =
"dump_mempool#"
"dump_devargs#"
"dump_lcores#"
- "dump_log_types");
+ "dump_log_types#"
+ "dump_trace");
static cmdline_parse_inst_t cmd_dump = {
.f = cmd_dump_parsed, /* function to call */