From: Ivan Pravdin <ipravdin.official@gmail.com>
To: bristot@kernel.org, rostedt@goodmis.org, corbet@lwn.net,
linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Ivan Pravdin <ipravdin.official@gmail.com>
Subject: [PATCH] rtla: clarify trace option syntax in documentation and usage help
Date: Tue, 22 Jul 2025 21:52:33 -0400 [thread overview]
Message-ID: <20250723015233.173630-1-ipravdin.official@gmail.com> (raw)
When using `rtla timerlat {top,hist}`, the `-t/--trace` option is
optional. However, when providing a filename, the long option requires
an equal sign (`=`), i.e., `--trace=<file>`. This is because the
command-line parser treats `--trace` without `=` as a flag with no
value, leading to unexpected behavior.
Valid usage:
- `-t[file]`
- `-t=[file]`
- `--trace=[file]`
Invalid usage:
- `-t [file]`
- `--trace [file]`
Clarify valid usage in documentation and help message.
Signed-off-by: Ivan Pravdin <ipravdin.official@gmail.com>
---
Documentation/tools/rtla/common_osnoise_options.rst | 2 +-
Documentation/tools/rtla/common_timerlat_options.rst | 2 +-
tools/tracing/rtla/src/timerlat_hist.c | 2 +-
tools/tracing/rtla/src/timerlat_top.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/tools/rtla/common_osnoise_options.rst b/Documentation/tools/rtla/common_osnoise_options.rst
index d73de2d58f5f..0b73a55f1d1f 100644
--- a/Documentation/tools/rtla/common_osnoise_options.rst
+++ b/Documentation/tools/rtla/common_osnoise_options.rst
@@ -26,6 +26,6 @@
Specify the minimum delta between two time reads to be considered noise.
The default threshold is *5 us*.
-**-t**, **--trace** \[*file*]
+**-t**, **--trace**=\[*file*]
Save the stopped trace to [*file|osnoise_trace.txt*].
diff --git a/Documentation/tools/rtla/common_timerlat_options.rst b/Documentation/tools/rtla/common_timerlat_options.rst
index 10dc802f8d65..8d55b590c7d0 100644
--- a/Documentation/tools/rtla/common_timerlat_options.rst
+++ b/Documentation/tools/rtla/common_timerlat_options.rst
@@ -22,7 +22,7 @@
Save the stack trace at the *IRQ* if a *Thread* latency is higher than the
argument in us.
-**-t**, **--trace** \[*file*]
+**-t**, **--trace**=\[*file*]
Save the stopped trace to [*file|timerlat_trace.txt*].
diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/src/timerlat_hist.c
index 36d2294c963d..b6e1275b0e71 100644
--- a/tools/tracing/rtla/src/timerlat_hist.c
+++ b/tools/tracing/rtla/src/timerlat_hist.c
@@ -730,7 +730,7 @@ static void timerlat_hist_usage(char *usage)
" -d/--duration time[m|h|d]: duration of the session in seconds",
" --dump-tasks: prints the task running on all CPUs if stop conditions are met (depends on !--no-aa)",
" -D/--debug: print debug info",
- " -t/--trace[file]: save the stopped trace to [file|timerlat_trace.txt]",
+ " -t/--trace=[file]: save the stopped trace to [file|timerlat_trace.txt]",
" -e/--event <sys:event>: enable the <sys:event> in the trace instance, multiple -e are allowed",
" --filter <filter>: enable a trace event filter to the previous -e event",
" --trigger <trigger>: enable a trace event trigger to the previous -e event",
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index 7365e08fe986..19ee98456e3f 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -496,7 +496,7 @@ static void timerlat_top_usage(char *usage)
" -d/--duration time[s|m|h|d]: duration of the session",
" -D/--debug: print debug info",
" --dump-tasks: prints the task running on all CPUs if stop conditions are met (depends on !--no-aa)",
- " -t/--trace[file]: save the stopped trace to [file|timerlat_trace.txt]",
+ " -t/--trace=[file]: save the stopped trace to [file|timerlat_trace.txt]",
" -e/--event <sys:event>: enable the <sys:event> in the trace instance, multiple -e are allowed",
" --filter <command>: enable a trace event filter to the previous -e event",
" --trigger <command>: enable a trace event trigger to the previous -e event",
--
2.45.2
next reply other threads:[~2025-07-23 1:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 1:52 Ivan Pravdin [this message]
2025-07-24 13:56 ` [PATCH] rtla: clarify trace option syntax in documentation and usage help Steven Rostedt
2025-07-25 9:13 ` Tomas Glozar
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=20250723015233.173630-1-ipravdin.official@gmail.com \
--to=ipravdin.official@gmail.com \
--cc=bristot@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@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 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).