[DTrace-devel] [PATCH dtrace 0/3] fprobe fallback kprobe support, sched fix
Alan Maguire
alan.maguire at oracle.com
Wed Oct 9 14:02:33 UTC 2024
This series is focused on solving a few issues with fprobe-based
attachment which prevent us being able to attach to functions
like finish_task_switch.isra.0. Such functions are present in
available_filter_functions, but because they either lack BTF
representations or those representations are named without the
.isra suffix, attachment via fentry/fexit is currently impossible.
Falling back to kprobe attach is the best solution here.
However providers have been written with the implicit assumption
that certain aspects of the probes are shared across the provider;
program type, stack skips etc. Patch 1 addresses this by providing
optional provider implementation callbacks to return these values
for a specific probe. Patch 2 then updates the fbt provider to
use these mechanisms to support fallback to kprobe and to support
"."-suffixed functions. Finally patch 3 can then specify
fbt::finish_task_switch*:return as the underlying probe for
sched:::on-cpu.
Tested on upstream, UEK7 (5.15-based kernel) and UEK6 (5.4-based).
Alan Maguire (3):
dtrace: add support for probe-specific prog types, stack skips
fbt: support ".isra.0" suffixed functions
sched: fix on-cpu firing for kernels < 5.16
libdtrace/dt_bpf.c | 4 +-
libdtrace/dt_cc.c | 2 +-
libdtrace/dt_probe.c | 16 ++++++++
libdtrace/dt_probe.h | 2 +
libdtrace/dt_prov_fbt.c | 84 +++++++++++++++++++++++++++++++-------
libdtrace/dt_prov_rawtp.c | 2 +-
libdtrace/dt_prov_sched.c | 23 +----------
libdtrace/dt_prov_sdt.c | 2 +-
libdtrace/dt_provider.h | 4 ++
libdtrace/dt_provider_tp.c | 12 +++++-
libdtrace/dt_provider_tp.h | 9 +++-
11 files changed, 117 insertions(+), 43 deletions(-)
--
2.43.5
More information about the DTrace-devel
mailing list