]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rtla/timerlat_hist: Use BPF to collect samples
authorTomas Glozar <tglozar@redhat.com>
Tue, 18 Feb 2025 14:58:56 +0000 (15:58 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 4 Mar 2025 17:35:18 +0000 (12:35 -0500)
commitfd7925cbb729c7744ffbac95928be4598354c540
treeef9edc990fcf4a9d85d070a1dddd84f4255119d5
parente34293ddcebd6bd39ff04666f010fce8d1f5e15a
rtla/timerlat_hist: 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, instead of waking up every second to collect samples,
rtla simply sleeps until woken up by a signal or threshold overflow.

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-6-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_hist.c