All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH v3] trace-cmd: List ftrace instances at the end of trace-cmd stat
Date: Tue,  5 May 2020 13:17:19 +0300	[thread overview]
Message-ID: <20200505101719.1856601-2-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20200505101719.1856601-1-tz.stoyanov@gmail.com>

By default, "trace-cmd stat" command prints status of the main ftrace
instance. At top of the output there is a listing of all configured
instances abd the user could be confused which status is displayed.
Moved this list at the end of the command output.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
v3: Removed the "main" when top instance is displayed and move instance
    listing at the end of command's output.

 tracecmd/trace-stat.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tracecmd/trace-stat.c b/tracecmd/trace-stat.c
index c5057978..bd0e647a 100644
--- a/tracecmd/trace-stat.c
+++ b/tracecmd/trace-stat.c
@@ -920,8 +920,7 @@ static void stat_instance(struct buffer_instance *instance)
 			printf("---------------\n");
 		printf("Instance: %s\n",
 			tracefs_instance_get_name(instance->tracefs));
-	} else
-		report_instances();
+	}
 
 	report_plugin(instance);
 	report_events(instance);
@@ -937,6 +936,8 @@ static void stat_instance(struct buffer_instance *instance)
 	report_uprobes(instance);
 	report_traceon(instance);
 	report_errorlog(instance);
+	if (instance == &top_instance)
+		report_instances();
 }
 
 void trace_stat (int argc, char **argv)
-- 
2.26.2


      reply	other threads:[~2020-05-05 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 10:17 [PATCH v3] trace-cmd: Handle filtered PIDs per ftarce instance Tzvetomir Stoyanov (VMware)
2020-05-05 10:17 ` Tzvetomir Stoyanov (VMware) [this message]

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=20200505101719.1856601-2-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.