linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/6] Assume sysfs event names are always the same case
@ 2024-05-02 21:35 Ian Rogers
  2024-05-02 21:35 ` [PATCH v5 1/6] perf test pmu-events: Make it clearer that pmu-events tests json events Ian Rogers
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Ian Rogers @ 2024-05-02 21:35 UTC (permalink / raw)
  To: Kan Liang, Thomas Richter, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Bjorn Helgaas, Jonathan Corbet,
	Randy Dunlap, Jing Zhang, James Clark, Ravi Bangoria,
	linux-kernel, linux-perf-users
  Cc: Ian Rogers

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/20240413040812.4042051-1-irogers@google.com/

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

v3: incorporate feedback from Thomas Richter <tmricht@linux.ibm.com>
    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(-)

-- 
2.45.0.rc1.225.g2a3ae87e7f-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-05-13 18:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 21:35 [PATCH v5 0/6] Assume sysfs event names are always the same case Ian Rogers
2024-05-02 21:35 ` [PATCH v5 1/6] perf test pmu-events: Make it clearer that pmu-events tests json events Ian Rogers
2024-05-02 21:35 ` [PATCH v5 2/6] perf Document: Sysfs event names must be lower or upper case Ian Rogers
2024-05-12 22:08   ` Randy Dunlap
2024-05-13 16:22     ` Ian Rogers
2024-05-13 18:54       ` Randy Dunlap
2024-05-02 21:35 ` [PATCH v5 3/6] perf test pmu: Refactor format test and exposed test APIs Ian Rogers
2024-05-02 21:35 ` [PATCH v5 4/6] perf test pmu: Add an eagerly loaded event test Ian Rogers
2024-05-02 21:35 ` [PATCH v5 5/6] perf test pmu: Test all sysfs PMU event names are the same case Ian Rogers
2024-05-02 21:35 ` [PATCH v5 6/6] perf pmu: Assume sysfs events are always " Ian Rogers
2024-05-03 20:09 ` [PATCH v5 0/6] Assume sysfs event names " Arnaldo Carvalho de Melo
2024-05-06 15:34 ` Thomas Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).