DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>
Cc: Slava Ovsiienko <viacheslavo@nvidia.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	 Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v2 1/5] app/testpmd: add trace save command
Date: Fri, 23 Jun 2023 17:33:49 +0530	[thread overview]
Message-ID: <CALBAE1OPv4ZHeAvrN2jrSaYrJf12s0aSAyU=NbtW5HaFbFbqMw@mail.gmail.com> (raw)
In-Reply-To: <6ea523e0-12a1-99cd-5682-23537955f63b@amd.com>

On Fri, Jun 23, 2023 at 5:23 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 6/23/2023 9:00 AM, Slava Ovsiienko wrote:
> > Hi, Ferruh
> >
> >> -----Original Message-----
> >> From: Ferruh Yigit <ferruh.yigit@amd.com>
> >> Sent: Wednesday, June 21, 2023 2:16 PM
> >> To: Slava Ovsiienko <viacheslavo@nvidia.com>; dev@dpdk.org; Aman Singh
> >> <aman.deep.singh@intel.com>
> >> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> >> Subject: Re: [PATCH v2 1/5] app/testpmd: add trace save command
> >>
> >> On 6/13/2023 5:58 PM, Viacheslav Ovsiienko wrote:
> >>> The "save_trace" CLI command is added to trigger saving the trace
> >>> dumps to the trace directory.
> >>>
> >>
> >> Hi Viacheslav,
> >>
> >> Trace is already saved when dpdk application terminated, I guess this is to
> >> save the trace before exiting the application, what is the use case for this, can
> >> you please detail in the commit log.
> >
> > OK, will update the commit log. The command "save_trace" is useful in some
> > dynamic debug scenarios to save the trace without restarting the entire application.
> >
> >>
> >> And what happens if this is called multiple times, or what happens on the
> >> application exit, will it overwrite the file or fail?
> > It overwrites.
> >
> >> Again please explain in the commit log.
> > Sure, will do.
> >
> >>
> >>> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> >>> ---
> >>>  app/test-pmd/cmdline.c | 38 ++++++++++++++++++++++++++++++++++++++
> >>>  1 file changed, 38 insertions(+)
> >>>
> >>
> >> Can you please update documentation too?
> >>
> >>> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> >>> a15a442a06..db71ce2028 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>
> >>> @@ -12745,6 +12746,40 @@ static cmdline_parse_inst_t
> >> cmd_config_tx_affinity_map = {
> >>>     },
> >>>  };
> >>>
> >>> +#ifndef RTE_EXEC_ENV_WINDOWS
> >>> +/* *** SAVE_TRACE *** */
> >>> +
> >>> +struct cmd_save_trace_result {
> >>> +   cmdline_fixed_string_t save;
> >>> +};
> >>> +
> >>> +static void cmd_save_trace_parsed(__rte_unused void *parsed_result,
> >>> +                             __rte_unused struct cmdline *cl,
> >>> +                             __rte_unused void *data)
> >>> +{
> >>> +   int rc;
> >>> +
> >>> +   rc = rte_trace_save();
> >>> +   if (rc)
> >>> +           printf("Save trace failed with error: %d\n", rc);
> >>> +   else
> >>> +           printf("Trace saved successfully\n"); }
> >>> +
> >>> +static cmdline_parse_token_string_t cmd_save_trace_save =
> >>> +   TOKEN_STRING_INITIALIZER(struct cmd_save_trace_result, save,
> >>> +"save_trace");
> >>> +
> >>
> >> We have dump_* commands, what do you think to have 'dump_trace'
> >> command for this?
> > It was initially (in v1) with "dump_trace" command.
> > And there is the comment by Jerin:
> > https://inbox.dpdk.org/dev/CALBAE1Of79a_jHnFT3KX--Enhud-h5RzL02TMQBsmoW721ds7A@mail.gmail.com/#t
> >
> > So, I have changed to "save_trace". I have no strong opinion about command name, any allowing trace save is OK for me.
> >
>
> Ah, I missed that.
>
>
> @Jerin,
> I just saw your comment, agree more exact action can be 'save' but
> 'dump' also describes enough.
> Since there are existing 'dump_*' commands, it makes command more
> intuitive and easy to remember.
>
> As an active user of testpmd myself, I am finding it hard to
> remember/find the command I need as number of commands increased. That
> is why I am paying extra attention to have more hierarchical, consistent
> and intuitive commands.
>
> For me "dump_trace" works better in that manner, what do you think, do
> you have strong opinion on 'save_trace'?

dump_* commands dumping on stdout or FILE.
Trace is mostly saving "current trace buffer" it and internally it
figure out the FILE.
But no strong opinion, if testpmd user thinks "dump" is better.


>

  reply	other threads:[~2023-06-23 12:04 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 10:07 [RFC 0/5] net/mlx5: introduce Tx datapath tracing Viacheslav Ovsiienko
2023-04-20 10:07 ` [RFC 1/5] app/testpmd: add trace dump command Viacheslav Ovsiienko
2023-04-20 10:13   ` Jerin Jacob
2023-04-20 10:08 ` [RFC 2/5] common/mlx5: introduce tracepoints for mlx5 drivers Viacheslav Ovsiienko
2023-04-20 10:11   ` Jerin Jacob
2023-06-13 15:50     ` Slava Ovsiienko
2023-06-13 15:53       ` Jerin Jacob
2023-06-13 15:59         ` Slava Ovsiienko
2023-06-13 16:01           ` Jerin Jacob
2023-06-27  0:39             ` Thomas Monjalon
2023-06-27  6:15               ` Slava Ovsiienko
2023-06-27  7:28                 ` Thomas Monjalon
2023-06-27  8:19                   ` Slava Ovsiienko
2023-06-27  9:33                     ` Thomas Monjalon
2023-06-27  9:43                       ` Slava Ovsiienko
2023-06-27 11:36                         ` Thomas Monjalon
2023-04-20 10:08 ` [RFC 3/5] net/mlx5: add Tx datapath tracing Viacheslav Ovsiienko
2023-04-20 10:08 ` [RFC 4/5] net/mlx5: add comprehensive send completion trace Viacheslav Ovsiienko
2023-04-20 10:08 ` [RFC 5/5] net/mlx5: add Tx datapath trace analyzing script Viacheslav Ovsiienko
2023-06-09 15:28 ` [PATCH 0/5] net/mlx5: introduce Tx datapath tracing Viacheslav Ovsiienko
2023-06-09 15:28   ` [PATCH 1/5] app/testpmd: add trace dump command Viacheslav Ovsiienko
2023-06-09 15:28   ` [PATCH 2/5] common/mlx5: introduce tracepoints for mlx5 drivers Viacheslav Ovsiienko
2023-06-09 15:28   ` [PATCH 3/5] net/mlx5: add Tx datapath tracing Viacheslav Ovsiienko
2023-06-09 15:28   ` [PATCH 4/5] net/mlx5: add comprehensive send completion trace Viacheslav Ovsiienko
2023-06-09 15:28   ` [PATCH 5/5] net/mlx5: add Tx datapath trace analyzing script Viacheslav Ovsiienko
2023-06-13 16:58 ` [PATCH v2 0/5] net/mlx5: introduce Tx datapath tracing Viacheslav Ovsiienko
2023-06-13 16:58   ` [PATCH v2 1/5] app/testpmd: add trace save command Viacheslav Ovsiienko
2023-06-21 11:15     ` Ferruh Yigit
2023-06-23  8:00       ` Slava Ovsiienko
2023-06-23 11:52         ` Ferruh Yigit
2023-06-23 12:03           ` Jerin Jacob [this message]
2023-06-23 12:14             ` Slava Ovsiienko
2023-06-23 12:23             ` Ferruh Yigit
2023-06-13 16:58   ` [PATCH v2 2/5] common/mlx5: introduce tracepoints for mlx5 drivers Viacheslav Ovsiienko
2023-06-13 16:58   ` [PATCH v2 3/5] net/mlx5: add Tx datapath tracing Viacheslav Ovsiienko
2023-06-13 16:58   ` [PATCH v2 4/5] net/mlx5: add comprehensive send completion trace Viacheslav Ovsiienko
2023-06-13 16:58   ` [PATCH v2 5/5] net/mlx5: add Tx datapath trace analyzing script Viacheslav Ovsiienko
2023-06-20 12:00   ` [PATCH v2 0/5] net/mlx5: introduce Tx datapath tracing Raslan Darawsheh
2023-06-27  0:46     ` Thomas Monjalon
2023-06-27 11:24       ` Slava Ovsiienko
2023-06-27 11:34         ` Thomas Monjalon
2023-06-28 14:18           ` Robin Jarry
2023-06-29  7:16             ` Slava Ovsiienko
2023-06-29  9:08               ` Robin Jarry
2023-06-26 11:06 ` [PATCH] app/testpmd: add trace dump command Viacheslav Ovsiienko
2023-06-26 11:07 ` [PATCH v3] " Viacheslav Ovsiienko
2023-06-26 11:57 ` [PATCH v4] " Viacheslav Ovsiienko
2023-06-27 11:34   ` Ferruh Yigit
2023-06-27 11:39     ` Slava Ovsiienko
2023-06-27 11:58       ` Ferruh Yigit
2023-06-27 14:44     ` [PATCH] app/testpmd: add dump command help message Viacheslav Ovsiienko
2023-06-27 18:03       ` Ferruh Yigit
2023-06-28  9:54         ` [PATCH v2] " Viacheslav Ovsiienko
2023-06-28 13:18           ` Ferruh Yigit
2023-06-27 13:09 ` [PATCH v5] app/testpmd: add trace dump command Viacheslav Ovsiienko
2023-06-27 15:18   ` Ferruh Yigit
2023-06-28 11:09 ` [PATCH v3 0/4] net/mlx5: introduce Tx datapath tracing Viacheslav Ovsiienko
2023-06-28 11:09   ` [PATCH v3 1/4] net/mlx5: introduce tracepoints for mlx5 drivers Viacheslav Ovsiienko
2023-06-28 11:09   ` [PATCH v3 2/4] net/mlx5: add comprehensive send completion trace Viacheslav Ovsiienko
2023-06-28 11:09   ` [PATCH v3 3/4] net/mlx5: add Tx datapath trace analyzing script Viacheslav Ovsiienko
2023-06-28 11:09   ` [PATCH v3 4/4] doc: add mlx5 datapath tracing feature description Viacheslav Ovsiienko
2023-07-05 11:10 ` [PATCH v4 0/4] net/mlx5: introduce Tx datapath tracing Viacheslav Ovsiienko
2023-07-05 11:10   ` [PATCH v4 1/4] net/mlx5: introduce tracepoints for mlx5 drivers Viacheslav Ovsiienko
2023-07-05 11:10   ` [PATCH v4 2/4] net/mlx5: add comprehensive send completion trace Viacheslav Ovsiienko
2023-07-05 11:10   ` [PATCH v4 3/4] net/mlx5: add Tx datapath trace analyzing script Viacheslav Ovsiienko
2023-07-05 11:10   ` [PATCH v4 4/4] doc: add mlx5 datapath tracing feature description Viacheslav Ovsiienko
2023-07-05 15:31 ` [PATCH v5 0/4] net/mlx5: introduce Tx datapath tracing Viacheslav Ovsiienko
2023-07-05 15:31   ` [PATCH v5 1/4] net/mlx5: introduce tracepoints for mlx5 drivers Viacheslav Ovsiienko
2023-07-05 15:31   ` [PATCH v5 2/4] net/mlx5: add comprehensive send completion trace Viacheslav Ovsiienko
2023-07-05 15:31   ` [PATCH v5 3/4] net/mlx5: add Tx datapath trace analyzing script Viacheslav Ovsiienko
2023-07-05 15:31   ` [PATCH v5 4/4] doc: add mlx5 datapath tracing feature description Viacheslav Ovsiienko
2023-07-06 16:27   ` [PATCH v5 0/4] net/mlx5: introduce Tx datapath tracing Raslan Darawsheh
2023-07-11 15:15 ` [PATCH v6 0/2] " Viacheslav Ovsiienko
2023-07-11 15:15   ` [PATCH v6 1/2] net/mlx5: add Tx datapath trace analyzing script Viacheslav Ovsiienko
2023-07-11 15:15   ` [PATCH v6 2/2] doc: add mlx5 datapath tracing feature description Viacheslav Ovsiienko
2023-07-27 10:52   ` [PATCH v6 0/2] net/mlx5: introduce Tx datapath tracing Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1OPv4ZHeAvrN2jrSaYrJf12s0aSAyU=NbtW5HaFbFbqMw@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=jerinj@marvell.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).