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 <crwood@redhat.com>
Link: https://lore.kernel.org/r/20251112152529.956778-5-crwood@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
This commit is contained in:
Crystal Wood
2025-11-12 09:25:28 -06:00
committed by Tomas Glozar
parent 61f1fd5d69
commit 3138df6f0c

View File

@@ -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(&params->common.threshold_actions);