diff options
author | Ian Rogers <irogers@google.com> | 2025-01-31 23:43:17 -0800 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2025-02-04 21:28:37 -0800 |
commit | 57e13264dcea670d5f42a067562f02aa923219e2 (patch) | |
tree | 356d30f1abd26b430b400457e602e31754c72ed9 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 340c345e587ef61e15f02483b1e72e5fa168f6ad (diff) |
perf pmus: Restructure pmu_read_sysfs to scan fewer PMUs
Rather than scanning core or all PMUs, allow pmu_read_sysfs to read
some combination of core, other, hwmon and tool PMUs. The PMUs that
should be read and are already read are held as bitmaps. It is known
that a "hwmon_" prefix is necessary for a hwmon PMU's name, similarly
with "tool", so only scan those PMUs in situations the PMU name or the
PMU's type number make sense to.
The number of openat system calls reduces from 276 to 98 for a hwmon
event. The number of openats for regular perf events isn't changed.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20250201074320.746259-3-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions