linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Crystal Wood <crwood@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-kernel@vger.kernel.org,
	John Kacur <jkacur@redhat.com>, Tomas Glozar <tglozar@redhat.com>,
	Costa Shulyupin <costa.shul@redhat.com>,
	Wander Lairson Costa <wander@redhat.com>,
	Crystal Wood <crwood@redhat.com>
Subject: [PATCH 4/5] rtla/timerlat: Exit top main loop on any non-zero wait_retval
Date: Wed, 12 Nov 2025 09:25:28 -0600	[thread overview]
Message-ID: <20251112152529.956778-5-crwood@redhat.com> (raw)
In-Reply-To: <20251112152529.956778-1-crwood@redhat.com>

Comparing to exactly 1 will fail if more than one ring buffer
event was seen since the last call to timerlat_bpf_wait(), which
can happen in some race scenarios.

Signed-off-by: Crystal Wood <crwood@redhat.com>
---
 tools/tracing/rtla/src/timerlat_top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index da5d5db1bc17..56cf4ad64847 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -921,7 +921,7 @@ timerlat_top_bpf_main_loop(struct osnoise_tool *tool)
 		if (!params->common.quiet)
 			timerlat_print_stats(tool);
 
-		if (wait_retval == 1) {
+		if (wait_retval != 0) {
 			/* Stopping requested by tracer */
 			actions_perform(&params->common.threshold_actions);
 
-- 
2.48.1


  parent reply	other threads:[~2025-11-12 15:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 15:25 [PATCH 0/5] rtla, osnoise: Fixes to address intermittent test issues Crystal Wood
2025-11-12 15:25 ` [PATCH 1/5] rtla/tests: Don't rely on matching ^1ALL Crystal Wood
2025-11-12 15:25 ` [PATCH 2/5] tracing/osnoise: Dump stack on timerlat uret threshold event Crystal Wood
2025-11-12 15:25 ` [PATCH 3/5] tracing/osnoise: Array printk init and cleanup Crystal Wood
2025-11-12 15:25 ` Crystal Wood [this message]
2025-11-12 15:25 ` [PATCH 5/5] rtla: Set stop threshold after all instances are enabled Crystal Wood
2025-11-12 15:51 ` [PATCH 0/5] rtla, osnoise: Fixes to address intermittent test issues Crystal Wood
2025-11-13 12:44 ` Wander Lairson Costa

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=20251112152529.956778-5-crwood@redhat.com \
    --to=crwood@redhat.com \
    --cc=costa.shul@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglozar@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).