linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v2 2/4] trace-cmd: Add "main" in the output of trace-cmd stat when displaying main instance
Date: Mon, 4 May 2020 09:41:21 -0400	[thread overview]
Message-ID: <20200504094121.65a733b6@gandalf.local.home> (raw)
In-Reply-To: <20200504062711.107867-3-tz.stoyanov@gmail.com>

On Mon,  4 May 2020 09:27:09 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:

> By default, "trace-cmd stat" command prints status of the main ftrace instance. When more
> instances are configured, the user could be confused which status is displayed.

Hmm, I'm not so big on this one. Has anyone complained about it? We never
actually gave a name to the top level. In fact, it can get more confusing
if someone were to create an instance called "main" then it would get even
more confusing.

I think the better answer is to just move the instance reporting to the
end, and not at the beginning. That would make more sense. I was thinking
of recommending that when I first applied the patch, but now I think it
should be done.

-- Steve

> 
> Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> ---
>  tracecmd/trace-stat.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tracecmd/trace-stat.c b/tracecmd/trace-stat.c
> index c5057978..dcf2789c 100644
> --- a/tracecmd/trace-stat.c
> +++ b/tracecmd/trace-stat.c
> @@ -920,8 +920,10 @@ static void stat_instance(struct buffer_instance *instance)
>  			printf("---------------\n");
>  		printf("Instance: %s\n",
>  			tracefs_instance_get_name(instance->tracefs));
> -	} else
> +	} else {
>  		report_instances();
> +		printf("\nInstance: main\n\n");
> +	}
>  
>  	report_plugin(instance);
>  	report_events(instance);


  reply	other threads:[~2020-05-04 13:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  6:27 [PATCH v2 0/4] Few small trace-cmd fixes Tzvetomir Stoyanov (VMware)
2020-05-04  6:27 ` [PATCH v2 1/4] trace-cmd: Fix trace-cmd report crash while displaying trace.dat in specific use case Tzvetomir Stoyanov (VMware)
2020-05-04 20:00   ` Steven Rostedt
2020-05-04  6:27 ` [PATCH v2 2/4] trace-cmd: Add "main" in the output of trace-cmd stat when displaying main instance Tzvetomir Stoyanov (VMware)
2020-05-04 13:41   ` Steven Rostedt [this message]
2020-05-04  6:27 ` [PATCH v2 3/4] trace-cmd: Create ftrace instances before using them Tzvetomir Stoyanov (VMware)
2020-05-04  6:27 ` [PATCH v2 4/4] trace-cmd: Do not try to update parent's memory from a fork()-ed child Tzvetomir Stoyanov (VMware)
2020-05-04 20:30   ` Steven Rostedt
2020-05-05  8:39     ` Tzvetomir Stoyanov

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=20200504094121.65a733b6@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=tz.stoyanov@gmail.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).