[RFC 1/5] app/testpmd: add trace dump command
Jerin Jacob
jerinjacobk at gmail.com
Thu Apr 20 12:13:01 CEST 2023
On Thu, Apr 20, 2023 at 3:39 PM Viacheslav Ovsiienko
<viacheslavo at nvidia.com> wrote:
>
> The "dump_trace" CLI command is added to trigger
> saving the trace dumps to the trace directory.
>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
> ---
> app/test-pmd/cmdline.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 7b20bef4e9..be9e3a9ed6 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -39,6 +39,7 @@
> #include <rte_gro.h>
> #endif
> #include <rte_mbuf_dyn.h>
> +#include <rte_trace.h>
>
> #include <cmdline_rdline.h>
> #include <cmdline_parse.h>
> @@ -8367,6 +8368,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();
Isn't saving the trace? If so, change the command to save_trace or so.
> }
>
> static cmdline_parse_token_string_t cmd_dump_dump =
> @@ -8379,7 +8382,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 */
> --
> 2.18.1
>
More information about the dev
mailing list