linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] trace-cmd show: Update help message for --hist and --trigger options
Date: Fri, 11 Apr 2025 09:13:53 -0400	[thread overview]
Message-ID: <20250411091353.13f2a48a@gandalf.local.home> (raw)

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The trace-cmd show help message was missing the --hist and --trigger
options. These are quite useful options and should be visible to the user
and not hidden as Easter eggs!

Also update the bash completion script to help out with the event list.

Fixes: 3e930655b ("trace-cmd show: Add --hist and --trigger options")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tracecmd/trace-cmd.bash | 4 ++++
 tracecmd/trace-usage.c  | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/tracecmd/trace-cmd.bash b/tracecmd/trace-cmd.bash
index 1bf4bc1b..c500ef0d 100644
--- a/tracecmd/trace-cmd.bash
+++ b/tracecmd/trace-cmd.bash
@@ -139,6 +139,10 @@ __trace_cmd_show_complete()
 	-B)
 	    show_instances "$cur"
 	    ;;
+	--hist|--trigger)
+	    local list=`list_events $cur`
+	    COMPREPLY=( $(compgen -W "all ${list}" -- "${cur}") )
+	    ;;
 	*)
 	    cmd_options show "$cur"
 	    ;;
diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c
index 9884631d..3fd975c0 100644
--- a/tracecmd/trace-usage.c
+++ b/tracecmd/trace-usage.c
@@ -177,6 +177,8 @@ static struct usage_help usage_help[] = {
 		"          -f display the file path that is being dumped\n"
 		"          The following options shows the corresponding file name\n"
 		"           and then exits.\n"
+		"          --hist event (show the hist file of an event)\n"
+		"          --trigger event (show the trigger file of an event)\n"
 		"          --tracing_on\n"
 		"          --current_tracer\n"
 		"          --buffer_size (for buffer_size_kb)\n"
-- 
2.47.2


                 reply	other threads:[~2025-04-11 13:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250411091353.13f2a48a@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.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 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).