Skip to content

perf python: Add missing infra pieces for counting perf events

Gautam Menghani linux-perf-users lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 7 repliesIn review
  2. v14 patches 6 repliesSuperseded

Changes in v2 from the cover letter

1. Use the existing iteration support for evlist
2. Drop the use of next method
3. Use existing helper functions for python example

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4perf python: Add support for perf_counts_values to return counter datatools/perf/util/python.c+91 -10 replies
2/4perf python: Add evsel read methodtools/perf/util/python.c+23 -00 replies
3/4perf python: Add evlist close supporttools/perf/util/python.c+16 -00 replies
4/4perf python: Add counting.py as example for counting perf eventstools/perf/python/counting.py+34 -07 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/4] perf python: Add missing infra pieces for counting perf events

Add the missing infra code in the perf python bindings for measuring and reading the counter values for the given perf event. Demonstrate the usage of this with counting.py - a python version of counting.c

v1 -> v2:
1. Use the existing iteration support for evlist
2. Drop the use of next method
3. Use existing helper functions for python example

Gautam Menghani (4):
perf python: Add support for perf_counts_values to return counter data perf python: Add evsel read method
perf python: Add evlist close support
perf python: Add counting.py as example for counting perf events

 tools/perf/python/counting.py |  33 +++++++++
 tools/perf/util/python.c      | 131 +++++++++++++++++++++++++++++++++-
 2 files changed, 163 insertions(+), 1 deletion(-)
 create mode 100755 tools/perf/python/counting.py
Signature · 1 line
2.49.0