Skip to content

perf, bpf: add support for HW_CACHE and RAW events

Alexei Starovoitov lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2perf, bpf: add support for HW_CACHE and RAW eventskernel/bpf/arraymap.c kernel/events/core.c kernel/trace/bpf_trace.c+5 -14 replies
2/2samples/bpf: add samples for HW_CACHE / RAW eventssamples/bpf/bpf_helpers.h samples/bpf/trace_event_user.c samples/bpf/tracex6_kern.c +1 more+182 -493 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDaniel Borkmann
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/2] perf, bpf: add support for HW_CACHE and RAW events

Patch 1: add support for HW_CACHE and RAW perf events to bpf:
- similar to PERF_TYPE_RAW and PERF_TYPE_HARDWARE allow PERF_TYPE_HW_CACHE events to be accessed via bpf_perf_event_read()
- similar to PERF_TYPE_HARDWARE and PERF_TYPE_SOFTWARE allow bpf programs to attch to PERF_TYPE_HW_CACHE and PERF_TYPE_RAW events as BPF_PROG_TYPE_PERF_EVENT program type

Patch 2: add tests for HW_CACHE and RAW events

---
Peter,
please review patch 1. It looks trivial and as far as we can see nothing else needed. The existing perf+bpf infra covers it just fine.

Thanks!

Teng Qin (2):
perf, bpf: add support for HW_CACHE and RAW events samples/bpf: add samples for HW_CACHE / RAW events

 kernel/bpf/arraymap.c          |   1 +
 kernel/events/core.c           |   4 +-
 kernel/trace/bpf_trace.c       |   1 +
 samples/bpf/bpf_helpers.h      |   2 +-
 samples/bpf/trace_event_user.c |  46 +++++++++++-
 samples/bpf/tracex6_kern.c     |  28 ++++++--
 samples/bpf/tracex6_user.c     | 155 +++++++++++++++++++++++++++++++----------
 7 files changed, 187 insertions(+), 50 deletions(-)
Signature · 1 line
2.9.3