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

By assuming sysfs events are lower case, the case insensitive event
parsing can probe for the existence of a file 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.

Ian Rogers (6):
  perf test pmu-events: Make it clearer that pmu-events tests json
    events
  perf Document: Capture that sysfs event names must be lower 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 lowercase
  perf pmu: Assume sysfs events are always lowercase

 .../sysfs-bus-event_source-devices-events     |   6 +
 tools/perf/tests/pmu-events.c                 |   2 +-
 tools/perf/tests/pmu.c                        | 444 +++++++++++-------
 tools/perf/util/parse-events.c                |   2 +-
 tools/perf/util/parse-events.h                |   2 +-
 tools/perf/util/pmu.c                         |  97 ++--
 tools/perf/util/pmu.h                         |   4 +-
 tools/perf/util/pmus.c                        |  16 +-
 tools/perf/util/pmus.h                        |   2 +
 9 files changed, 377 insertions(+), 198 deletions(-)

-- 
2.44.0.769.g3c40516874-goog


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

end of thread, other threads:[~2024-04-24  3:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23  3:17 [PATCH v2 0/6] Assume sysfs event names are always lowercase Ian Rogers
2024-04-23  3:17 ` [PATCH v2 1/6] perf test pmu-events: Make it clearer that pmu-events tests json events Ian Rogers
2024-04-23  3:17 ` [PATCH v2 2/6] perf Document: Capture that sysfs event names must be lower case Ian Rogers
2024-04-23  3:17 ` [PATCH v2 3/6] perf test pmu: Refactor format test and exposed test APIs Ian Rogers
2024-04-24  2:51   ` kernel test robot
2024-04-23  3:17 ` [PATCH v2 4/6] perf test pmu: Add an eagerly loaded event test Ian Rogers
2024-04-24  2:57   ` kernel test robot
2024-04-23  3:17 ` [PATCH v2 5/6] perf test pmu: Test all sysfs PMU event names are lowercase Ian Rogers
2024-04-23  3:17 ` [PATCH v2 6/6] perf pmu: Assume sysfs events are always lowercase Ian Rogers
2024-04-23  6:53 ` [PATCH v2 0/6] Assume sysfs event names " Thomas Richter
2024-04-23 15:15   ` Ian Rogers

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).