Skip to content

RFC perf: Add AUX data sampling

Alexander Shishkin lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6perf: Move mlock accounting to ring buffer allocationkernel/events/core.c kernel/events/internal.h kernel/events/ring_buffer.c+123 -7610 replies
2/6perf: Add api to (de-)allocate AUX buffers for kernel counterskernel/events/internal.h kernel/events/ring_buffer.c+102 -00 replies
3/6perf: Add a helper for looking up pmus by typekernel/events/core.c+13 -30 replies
4/6perf: Add infrastructure for using AUX data in perf samplesinclude/linux/perf_event.h include/uapi/linux/perf_event.h kernel/events/core.c+341 -20 replies
5/6perf: Disable PMU around address filter adjustmentkernel/events/core.c+16 -00 replies
6/6perf: Disable IRQs in address filter sync pathkernel/events/core.c+3 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/6] perf: Add AUX data sampling

Hi Peter,

This is an RFC, I'm not sending the tooling bits in this series, although they can be found here [1].

This series introduces AUX data sampling for perf events, which in case of our instruction/branch tracing PMUs like Intel PT, BTS, CS ETM means execution flow history leading up to a perf event's overflow.

The bulk of code is in 4/6, which adds attribute fields, creates kernel events to generate the AUX data, takes samples and takes care of all the tricky. 1/6 and 6/6 may also be considered separately from this series. In particular, I suspect that 6/6 applies today to the architectures that deliver PMIs as IRQs. Mathieu?

[1] https://git.kernel.org/cgit/linux/kernel/git/ash/linux.git/log/?h=perf-aux-sampling

Alexander Shishkin (6):
perf: Move mlock accounting to ring buffer allocation
perf: Add api to (de-)allocate AUX buffers for kernel counters
perf: Add a helper for looking up pmus by type
perf: Add infrastructure for using AUX data in perf samples
perf: Disable PMU around address filter adjustment
perf: Disable IRQs in address filter sync path

 include/linux/perf_event.h      |  12 ++
 include/uapi/linux/perf_event.h |  16 +-
 kernel/events/core.c            | 419 +++++++++++++++++++++++++++++++++-------
 kernel/events/internal.h        |  24 ++-
 kernel/events/ring_buffer.c     | 210 ++++++++++++++++++--
 5 files changed, 598 insertions(+), 83 deletions(-)
Signature · 1 line
2.9.3