[PATCH v2 0/3] perf util: bpf perf improvements

From: Song Liu
Date: Tue Apr 06 2021 - 20:36:12 EST


This patches set improves bpf_perf (perf-stat --bpf-counter) by
1) exposing key definitions to a libperf header;
2) adding compatibility check for perf_attr_map;
3) introducing config stat.bpf-counter-events.

Changes v1 => v2:
1. Separte 2/3 from 1/3. (Jiri)
2. Rename bperf.h to bpf_perf.h. (Jiri)
3. Other small fixes/optimizations. (Jiri)

Song Liu (3):
perf util: move bpf_perf definitions to a libperf header
perf bpf: check perf_attr_map is compatible with the perf binary
perf-stat: introduce config stat.bpf-counter-events

tools/lib/perf/include/perf/bpf_perf.h | 31 ++++++++++++++
tools/perf/Documentation/perf-stat.txt | 2 +
tools/perf/builtin-stat.c | 43 ++++++++++++-------
tools/perf/util/bpf_counter.c | 57 +++++++++++++++-----------
tools/perf/util/config.c | 32 +++++++++++++++
tools/perf/util/evsel.c | 2 +
tools/perf/util/evsel.h | 6 +++
tools/perf/util/target.h | 5 ---
8 files changed, 134 insertions(+), 44 deletions(-)
create mode 100644 tools/lib/perf/include/perf/bpf_perf.h

--
2.30.2