From: Crystal Wood Date: Wed, 12 Nov 2025 15:25:28 +0000 (-0600) Subject: rtla/timerlat: Exit top main loop on any non-zero wait_retval X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=3138df6f0cd04a75f8efa5b5270ba56d00a84ae6;p=linux%2F.git rtla/timerlat: Exit top main loop on any non-zero wait_retval 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 Link: https://lore.kernel.org/r/20251112152529.956778-5-crwood@redhat.com Signed-off-by: Tomas Glozar --- diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c index fec113ce370e..29c2c1f717ed 100644 --- a/tools/tracing/rtla/src/timerlat_top.c +++ b/tools/tracing/rtla/src/timerlat_top.c @@ -878,7 +878,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(¶ms->common.threshold_actions);