]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rtla/timerlat_top: Use BPF to collect samples
authorTomas Glozar <tglozar@redhat.com>
Tue, 18 Feb 2025 14:58:58 +0000 (15:58 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 4 Mar 2025 17:35:18 +0000 (12:35 -0500)
commit9a82a3fd9ef2afaafbd6f8059609cdead0f97f15
treedf52089670f518ba6b2e2fc177fa5cd1dadf68ef
parent18923806b1291102cad3a6b713006c7e7f563534
rtla/timerlat_top: Use BPF to collect samples

Collect samples using BPF program instead of pulling them from tracefs.

If the osnoise:timerlat_sample tracepoint is unavailable or the BPF
program fails to load for whatever reason, rtla falls back to the old
implementation.

The collection of samples using the BPF program is fully self-contained
and requires no activity of the userspace part of rtla during the
measurement. Thus, rtla only pulls the summary from the BPF map and
displays it every second, improving the performance.

In --aa-only mode, the BPF program does not collect any data and only
signalizes the end of tracing to userspace. An optimization that re-used
the main trace instance for auto-analysis in aa-only mode was dropped, as
rtla no longer turns tracing on in the main trace instance, making it
useless for auto-analysis.

Cc: John Kacur <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Link: https://lore.kernel.org/20250218145859.27762-8-tglozar@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/tracing/rtla/src/timerlat_top.c