Skip to content

perf util: bpf perf improvements

Song Liu lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 9 repliesIn review
  2. v44 patches 7 repliesSuperseded
  3. v34 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches11 repliesSuperseded
v12 patches4 repliesSuperseded

Changes in v5 from the cover letter

1. Add bpf_counter_ops->disable(). (Namhyung, Jiri)

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5perf util: move bpf_perf definitions to a libperf headertools/lib/perf/include/perf/bpf_perf.h tools/perf/util/bpf_counter.c+34 -240 replies
2/5perf bpf: check perf_attr_map is compatible with the perf binarytools/perf/util/bpf_counter.c+19 -00 replies
3/5perf-stat: introduce config stat.bpf-counter-eventstools/perf/Documentation/perf-stat.txt tools/perf/builtin-stat.c tools/perf/util/bpf_counter.c +4 more+63 -230 replies
4/5perf-stat: introduce ':b' modifiertools/perf/util/bpf_counter.c tools/perf/util/evsel.h tools/perf/util/parse-events.c +1 more+10 -30 replies
5/5perf-stat: introduce bpf_counter_ops->disable()tools/perf/util/bpf_counter.c tools/perf/util/bpf_counter.h tools/perf/util/evlist.c+37 -09 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH v5 0/5] perf util: bpf perf improvements

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.
4) introducing 'b' modify to event parser.
5) add bpf_counter_ops->disable()

Changes v4 => v5:
1. Add bpf_counter_ops->disable(). (Namhyung, Jiri)

Changes v3 => v4:
1. Improve the logic that decides when to skip read_affinity_counters(). (Jiri)
2. Clean up a condition in bpf_counters.c:read_counters(). (Jiri)

Changes v2 => v3:
1. Add 'b' modifier. (Jiri)
2. Allow configuring stat.bpf-counter-events with any event name (instead of limiting to hardware events). (Jiri)

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 (5):
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
perf-stat: introduce ':b' modifier
perf-stat: introduce bpf_counter_ops->disable()

 tools/lib/perf/include/perf/bpf_perf.h | 31 +++++++++++
 tools/perf/Documentation/perf-stat.txt |  2 +
 tools/perf/builtin-stat.c              | 42 +++++++++------
 tools/perf/util/bpf_counter.c          | 75 +++++++++++++++++---------
 tools/perf/util/bpf_counter.h          |  7 +++
 tools/perf/util/config.c               |  4 ++
 tools/perf/util/evlist.c               |  4 ++
 tools/perf/util/evsel.c                | 22 ++++++++
 tools/perf/util/evsel.h                |  9 ++++
 tools/perf/util/parse-events.c         |  8 ++-
 tools/perf/util/parse-events.l         |  2 +-
 tools/perf/util/target.h               |  5 --
 12 files changed, 162 insertions(+), 49 deletions(-)
 create mode 100644 tools/lib/perf/include/perf/bpf_perf.h

--
2.30.2