From: Tomas Glozar <tglozar@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
John Kacur <jkacur@redhat.com>,
Luis Goncalves <lgoncalv@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Chang Yin <cyin@redhat.com>,
Costa Shulyupin <costa.shul@redhat.com>,
Crystal Wood <crwood@redhat.com>,
Gabriele Monaco <gmonaco@redhat.com>,
Tomas Glozar <tglozar@redhat.com>
Subject: [PATCH v2 9/9] Documentation/rtla: Add actions feature
Date: Thu, 26 Jun 2025 14:34:05 +0200 [thread overview]
Message-ID: <20250626123405.1496931-10-tglozar@redhat.com> (raw)
In-Reply-To: <20250626123405.1496931-1-tglozar@redhat.com>
Document both --on-threshold and --on-end, with examples.
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
.../tools/rtla/common_timerlat_options.rst | 64 +++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/Documentation/tools/rtla/common_timerlat_options.rst b/Documentation/tools/rtla/common_timerlat_options.rst
index 10dc802f8d65..7854368f1827 100644
--- a/Documentation/tools/rtla/common_timerlat_options.rst
+++ b/Documentation/tools/rtla/common_timerlat_options.rst
@@ -55,3 +55,67 @@
Set timerlat to run without workload, waiting for the user to dispatch a per-cpu
task that waits for a new period on the tracing/osnoise/per_cpu/cpu$ID/timerlat_fd.
See linux/tools/rtla/sample/timerlat_load.py for an example of user-load code.
+
+**--on-threshold** *action*
+
+ Defines an action to be executed when tracing is stopped on a latency threshold
+ specified by **-i/--irq** or **-T/--thread**.
+
+ Multiple --on-threshold actions may be specified, and they will be executed in
+ the order they are provided. If any action fails, subsequent actions in the list
+ will not be executed.
+
+ Supported actions are:
+
+ - *trace[,file=<filename>]*
+
+ Saves trace output, optionally taking a filename. Alternative to -t/--trace.
+ Note that nlike -t/--trace, specifying this multiple times will result in
+ the trace being saved multiple times.
+
+ - *signal,num=<sig>,pid=<pid>*
+
+ Sends signal to process. "parent" might be specified in place of pid to target
+ the parent process of rtla.
+
+ - *shell,command=<command>*
+
+ Execute shell command.
+
+ - *continue*
+
+ Continue tracing after actions are executed instead of stopping.
+
+ Example:
+
+ $ rtla timerlat -T 20 --on-threshold trace
+ --on-threshold shell,command="grep ipi_send timerlat_trace.txt"
+ --on-threshold signal,num=2,pid=parent
+
+ This will save a trace with the default filename "timerlat_trace.txt", print its
+ lines that contain the text "ipi_send" on standard output, and send signal 2
+ (SIGINT) to the parent process.
+
+ Performance Considerations:
+
+ For time-sensitive actions, it is recommended to run **rtla timerlat** with BPF
+ support and RT priority. Note that due to implementational limitations, actions
+ might be delayed up to one second after tracing is stopped if BPF mode is not
+ available or disabled.
+
+**--on-end** *action*
+
+ Defines an action to be executed at the end of **rtla timerlat** tracing.
+
+ Multiple --on-end actions can be specified, and they will be executed in the order
+ they are provided. If any action fails, subsequent actions in the list will not be
+ executed.
+
+ See the documentation for **--on-threshold** for the list of supported actions, with
+ the exception that *continue* has no effect.
+
+ Example:
+
+ $ rtla timerlat -d 5s --on-end trace
+
+ This runs rtla timerlat with default options and save trace output at the end.
--
2.49.0
next prev parent reply other threads:[~2025-06-26 12:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 12:33 [PATCH v2 0/9] rtla/timerlat: Support actions on threshold and on end Tomas Glozar
2025-06-26 12:33 ` [PATCH v2 1/9] rtla/timerlat: Introduce enum timerlat_tracing_mode Tomas Glozar
2025-06-26 12:33 ` [PATCH v2 2/9] rtla/timerlat: Add action on threshold feature Tomas Glozar
2025-06-26 12:33 ` [PATCH v2 3/9] rtla/timerlat_bpf: Allow resuming tracing Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 4/9] rtla/timerlat: Add continue action Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 5/9] rtla/timerlat: Add action on end feature Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 6/9] rtla/tests: Check rtla output with grep Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 7/9] rtla/tests: Add tests for actions Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 8/9] rtla/tests: Limit duration to maximum of 10s Tomas Glozar
2025-06-26 12:34 ` Tomas Glozar [this message]
2025-07-21 22:36 ` [PATCH v2 9/9] Documentation/rtla: Add actions feature Steven Rostedt
2025-07-22 7:03 ` Tomas Glozar
2025-07-22 15:29 ` Steven Rostedt
2025-07-23 8:30 ` 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=20250626123405.1496931-10-tglozar@redhat.com \
--to=tglozar@redhat.com \
--cc=acme@kernel.org \
--cc=costa.shul@redhat.com \
--cc=crwood@redhat.com \
--cc=cyin@redhat.com \
--cc=gmonaco@redhat.com \
--cc=jkacur@redhat.com \
--cc=lgoncalv@redhat.com \
--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
all inboxes | Powered by JetHome®