Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Crystal Wood and committed by
Tomas Glozar
3138df6f 61f1fd5d

+1 -1
+1 -1
tools/tracing/rtla/src/timerlat_top.c
··· 878 878 if (!params->common.quiet) 879 879 timerlat_print_stats(tool); 880 880 881 - if (wait_retval == 1) { 881 + if (wait_retval != 0) { 882 882 /* Stopping requested by tracer */ 883 883 actions_perform(&params->common.threshold_actions); 884 884