Linux DTrace development list
 help / color / mirror / Atom feed
* [PATCH dtrace 0/3] fprobe fallback kprobe support, sched fix
@ 2024-10-09 14:02 Alan Maguire
  2024-10-09 14:02 ` [PATCH dtrace 1/3] dtrace: add support for probe-specific prog types, stack skips Alan Maguire
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Alan Maguire @ 2024-10-09 14:02 UTC (permalink / raw)
  To: dtrace; +Cc: dtrace-devel, Alan Maguire

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-10-11  2:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09 14:02 [PATCH dtrace 0/3] fprobe fallback kprobe support, sched fix Alan Maguire
2024-10-09 14:02 ` [PATCH dtrace 1/3] dtrace: add support for probe-specific prog types, stack skips Alan Maguire
2024-10-09 14:02 ` [PATCH dtrace 2/3] fbt: support ".isra.0" suffixed functions Alan Maguire
2024-10-09 14:02 ` [PATCH dtrace 3/3] sched: fix on-cpu firing for kernels < 5.16 Alan Maguire
2024-10-09 17:34 ` [PATCH dtrace 0/3] fprobe fallback kprobe support, sched fix Kris Van Hees
2024-10-10 21:03   ` Alan Maguire
2024-10-11  2:47     ` Kris Van Hees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox