Skip to content

Event parsing fixes

Ian Rogers 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. v3 Latest5 patches 6 repliesIn review
  2. v24 patches 4 repliesApplied

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5perf evsel: Add alternate_hw_config and use in evsel__matchtools/perf/builtin-diff.c tools/perf/util/evsel.c tools/perf/util/evsel.h +4 more+70 -410 replies
2/5perf stat: Uniquify event name improvementstools/perf/util/stat-display.c+78 -230 replies
3/5perf stat: Remove evlist__add_default_attrs use stringstools/perf/arch/x86/util/evlist.c tools/perf/builtin-stat.c tools/perf/util/evlist.c +2 more+117 -3074 replies
4/5perf evsel x86: Make evsel__has_perf_metrics work for legacy eventstools/perf/arch/x86/util/evsel.c+26 -50 replies
5/5perf evsel: Remove pmu_nametools/perf/arch/x86/util/evsel.c tools/perf/tests/parse-events.c tools/perf/util/evlist.c +6 more+14 -220 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchKan Liang
1/5
2/5
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] Event parsing fixes

For the default events, parse from strings rather than use pre-cooked perf_event_attr. This fixes non-x86 heterogeneous CPUs where legacy hardware events wouldn't be opened for all PMUs. v2 was previously just patch 3 but it is extended in v3 to incorporate related fixes.

When a sysfs/json event is used in preference to a legacy event, allow evsel__match to still function using a saved hardware config number. This fixes hard coded metrics in stat-shadow for events like "instructions" on Intel that have a sysfs file.

Fix/improve uniquifying event names fixing the test "102: perf stat metrics (shadow stat) test:" that was broken by a formatting issue when the sysfs instructions event was used.

Having evsel->pmu_name and evsel->pmu->name is confusing, get rid of the former. Fix/improve evsel__sys_has_perf_metrics in the process.

Ian Rogers (5):
perf evsel: Add alternate_hw_config and use in evsel__match perf stat: Uniquify event name improvements
perf stat: Remove evlist__add_default_attrs use strings perf evsel x86: Make evsel__has_perf_metrics work for legacy events perf evsel: Remove pmu_name

 tools/perf/arch/x86/util/evlist.c |  74 +-------
 tools/perf/arch/x86/util/evsel.c  |  35 +++-
 tools/perf/builtin-diff.c         |   6 +-
 tools/perf/builtin-stat.c         | 291 ++++++++++++------------------
 tools/perf/tests/parse-events.c   |   2 +-
 tools/perf/util/evlist.c          |  46 +----
 tools/perf/util/evlist.h          |  12 --
 tools/perf/util/evsel.c           |  28 ++-
 tools/perf/util/evsel.h           |  22 +--
 tools/perf/util/metricgroup.c     |   4 +-
 tools/perf/util/parse-events.c    |  52 ++++--
 tools/perf/util/parse-events.h    |   6 +
 tools/perf/util/pmu.c             |   6 +-
 tools/perf/util/pmu.h             |   2 +-
 tools/perf/util/stat-display.c    | 101 ++++++++---
 tools/perf/util/stat-shadow.c     |  14 +-
 tools/perf/util/stat.c            |   2 +-
 17 files changed, 305 insertions(+), 398 deletions(-)
Signature · 1 line
2.45.0.118.g7fe29c98d7-goog