]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rtla/timerlat_top: Stop timerlat tracer on signal
authorTomas Glozar <tglozar@redhat.com>
Thu, 16 Jan 2025 14:49:29 +0000 (15:49 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 24 Jan 2025 18:45:23 +0000 (13:45 -0500)
commita4dfce7559d75430c464294ddee554be2a413c4a
tree5de203fa22c5be7a337b7cb1e577fc522d829ab0
parentc73cab9dbed04d8f65ca69177b4b21ed3e09dfa7
rtla/timerlat_top: Stop timerlat tracer on signal

Currently, when either SIGINT from the user or SIGALRM from the duration
timer is caught by rtla-timerlat, stop_tracing is set to break out of
the main loop. This is not sufficient for cases where the timerlat
tracer is producing more data than rtla can consume, since in that case,
rtla is looping indefinitely inside tracefs_iterate_raw_events, never
reaches the check of stop_tracing and hangs.

In addition to setting stop_tracing, also stop the timerlat tracer on
received signal (SIGINT or SIGALRM). This will stop new samples so that
the existing samples may be processed and tracefs_iterate_raw_events
eventually exits.

Cc: stable@vger.kernel.org
Cc: John Kacur <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Link: https://lore.kernel.org/20250116144931.649593-4-tglozar@redhat.com
Fixes: a828cd18bc4a ("rtla: Add timerlat tool and timelart top mode")
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/tracing/rtla/src/timerlat_top.c