mbox series

[bpf-next,0/2] Allow attaching to bare tracepoints

Message ID 20210111182027.1448538-1-qais.yousef@arm.com (mailing list archive)
Headers show
Series Allow attaching to bare tracepoints | expand

Message

Qais Yousef Jan. 11, 2021, 6:20 p.m. UTC
Add some missing glue logic to teach bpf about bare tracepoints - tracepoints
without any trace event associated with them.

Bare tracepoints are declare with DECLARE_TRACE(). Full tracepoints are declare
with TRACE_EVENT().

BPF can attach to these tracepoints as RAW_TRACEPOINT() only as there's no
events in tracefs created with them.

Qais Yousef (2):
  trace: bpf: Allow bpf to attach to bare tracepoints
  selftests: bpf: Add a new test for bare tracepoints

 Documentation/bpf/bpf_design_QA.rst                  |  6 ++++++
 include/trace/bpf_probe.h                            | 12 ++++++++++--
 .../selftests/bpf/bpf_testmod/bpf_testmod-events.h   |  6 ++++++
 .../testing/selftests/bpf/bpf_testmod/bpf_testmod.c  |  2 ++
 .../testing/selftests/bpf/prog_tests/module_attach.c |  1 +
 .../testing/selftests/bpf/progs/test_module_attach.c | 10 ++++++++++
 6 files changed, 35 insertions(+), 2 deletions(-)