diff options
| author | Ian Rogers <irogers@google.com> | 2025-01-31 23:43:17 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-10 14:44:29 +0200 |
| commit | 9c8dc3b2c3b10d340199c50b144b5ff4eab60411 (patch) | |
| tree | 9217cdace8e301223948354c77800f4d0c17cda4 /tools/perf/util/tool_pmu.h | |
| parent | c9b6124876a0608aa488ace5d3bfe92d59b55de4 (diff) | |
| download | linux-9c8dc3b2c3b10d340199c50b144b5ff4eab60411.tar.gz linux-9c8dc3b2c3b10d340199c50b144b5ff4eab60411.tar.bz2 linux-9c8dc3b2c3b10d340199c50b144b5ff4eab60411.zip | |
perf pmus: Restructure pmu_read_sysfs to scan fewer PMUs
[ Upstream commit 57e13264dcea670d5f42a067562f02aa923219e2 ]
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>
Stable-dep-of: 72c6f57a4193 ("perf pmu: Dynamically allocate tool PMU")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/util/tool_pmu.h')
0 files changed, 0 insertions, 0 deletions
