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(-) -- 2.9.3