From: Tomas Glozar <tglozar@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>, Tomas Glozar <tglozar@redhat.com>
Cc: John Kacur <jkacur@redhat.com>,
Luis Goncalves <lgoncalv@redhat.com>,
Crystal Wood <crwood@redhat.com>,
Costa Shulyupin <costa.shul@redhat.com>,
Wander Lairson Costa <wander@redhat.com>,
linux-trace-kernel <linux-trace-kernel@vger.kernel.org>
Subject: [PATCH 1/2] rtla/timerlat_top: Trigger actions with --aa-only in BPF mode
Date: Fri, 27 Nov 2026 12:32:18 +0100 [thread overview]
Message-ID: <20261127113219.86220-1-tglozar@redhat.com> (raw)
The implementation of timerlat_top_bpf_main_loop() for aa-only mode is
reduced to one call of timerlat_bpf_wait(), after which the function
returns. This does not allow for any actions to be performed, including
trace output and continuation of tracing.
Modify the implementation so that --aa-only uses the same code path as
--quiet, with the exception of not calling timerlat_top_bpf_pull_data(),
as rtla does not collect any aggregated data in that mode.
This fixes a discrepancy with regards the tool's behavior in tracefs
mode, where actions are handled by the shared top_main_loop() function.
The discrepancy appeared back when actions were moved to the main loop
to allow the implementation of --on-threshold continue; --aa-only was
not taken into consideration.
Fixes: 8d933d5c89e8 ("rtla/timerlat: Add continue action")
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
tools/tracing/rtla/src/timerlat_top.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index 2afd619c16059..f9221c71dd1ed 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -515,23 +515,25 @@ static int
timerlat_top_bpf_main_loop(struct osnoise_tool *tool)
{
const struct common_params *params = tool->params;
- int retval, wait_retval;
+ int sleep_time, retval, wait_retval;
- if (params->aa_only) {
- /* Auto-analysis only, just wait for stop tracing */
- timerlat_bpf_wait(-1);
- return 0;
+ if (params->quiet || params->aa_only) {
+ /* There is no data to periodically refresh */
+ sleep_time = -1;
+ } else {
+ sleep_time = params->sleep_time;
}
/* Pull and display data in a loop */
while (!stop_tracing) {
- wait_retval = timerlat_bpf_wait(params->quiet ? -1 :
- params->sleep_time);
+ wait_retval = timerlat_bpf_wait(sleep_time);
- retval = timerlat_top_bpf_pull_data(tool);
- if (retval) {
- err_msg("Error pulling BPF data\n");
- return retval;
+ if (!params->aa_only) {
+ retval = timerlat_top_bpf_pull_data(tool);
+ if (retval) {
+ err_msg("Error pulling BPF data\n");
+ return retval;
+ }
}
if (!params->quiet)
--
2.56.1
next reply other threads:[~2026-11-27 11:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 11:32 Tomas Glozar [this message]
2026-11-27 11:32 ` [PATCH 2/2] rtla/tests: Test --aa-only with actions 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=20261127113219.86220-1-tglozar@redhat.com \
--to=tglozar@redhat.com \
--cc=costa.shul@redhat.com \
--cc=crwood@redhat.com \
--cc=jkacur@redhat.com \
--cc=lgoncalv@redhat.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=wander@redhat.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