Skip to content

Assume sysfs event names are always the same case

Ian Rogers linux-perf-users lkml 4 versions – Applied

Status from this message: Thanks, applied to perf-tools-next,

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 5 repliesApplied
  2. v46 patches 3 repliesSuperseded
  3. v36 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v26 patches2 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/6perf test pmu-events: Make it clearer that pmu-events tests json eventstools/perf/tests/pmu-events.c+1 -10 replies
2/6perf Document: Sysfs event names must be lower or upper caseDocumentation/ABI/testing/sysfs-bus-event_source-devices-events+6 -03 replies
3/6perf test pmu: Refactor format test and exposed test APIstools/perf/tests/pmu.c tools/perf/util/parse-events.c tools/perf/util/parse-events.h +4 more+177 -1790 replies
4/6perf test pmu: Add an eagerly loaded event testtools/perf/tests/pmu.c tools/perf/util/pmu.c+124 -210 replies
5/6perf test pmu: Test all sysfs PMU event names are the same casetools/perf/tests/pmu.c+90 -00 replies
6/6perf pmu: Assume sysfs events are always the same casetools/perf/util/pmu.c+26 -50 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchKan LiangThomas Richter
SeriesT-b
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

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

Read the v5 thread

Cover letter [PATCH v5 0/6] Assume sysfs event names are always the same case

By assuming sysfs events are either upper or lower case, the case insensitive event parsing can probe for the existence of files rather then loading all events in a directory. When the event is a json event like inst_retired.any on Intel, this reduces the number of openat calls on a Tigerlake laptop from 325 down to 255.

v1 sent as an RFC:

    https://lore.kernel.org/lkml/[email protected]/

v2: addresses review feedback from Kan Liang, by updating
documentation and adding tests.

v3: incorporate feedback from Thomas Richter <[email protected]>
that s390 event names are all upper case. Do a lower case probe then an upper case probe, make documentation and tests also agree.

v4: add checks to write (kernel test robot) and fix a typo.

v5: Add reviewed-by: Kan Liang and fix potential uninitialized use.

Ian Rogers (6):
perf test pmu-events: Make it clearer that pmu-events tests json
events
perf Document: Sysfs event names must be lower or upper case perf test pmu: Refactor format test and exposed test APIs perf test pmu: Add an eagerly loaded event test
perf test pmu: Test all sysfs PMU event names are the same case perf pmu: Assume sysfs events are always the same case

 .../sysfs-bus-event_source-devices-events     |   6 +
 tools/perf/tests/pmu-events.c                 |   2 +-
 tools/perf/tests/pmu.c                        | 467 ++++++++++++------
 tools/perf/util/parse-events.c                |   2 +-
 tools/perf/util/parse-events.h                |   2 +-
 tools/perf/util/pmu.c                         | 111 +++--
 tools/perf/util/pmu.h                         |   4 +-
 tools/perf/util/pmus.c                        |  16 +-
 tools/perf/util/pmus.h                        |   2 +
 9 files changed, 415 insertions(+), 197 deletions(-)
Signature · 1 line
2.45.0.rc1.225.g2a3ae87e7f-goog