mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
b1f05622fe
PMU alias names were computed when the first perf_pmu is created, scanning all PMUs in event sources for a file called alias that generally doesn't exist. Switch to trying to load the file when all PMU related files are loaded in lookup. This would cause a PMU name lookup of an alias name to fail if no PMUs were loaded, so in that case all PMUs are loaded and the find repeated. The overhead is similar but in the (very) general case not all PMUs are scanned for the alias file. As the overhead occurs once per invocation it doesn't show in perf bench internals pmu-scan. On a tigerlake machine, the number of openat system calls for an event of cpu/cycles/ with perf stat reduces from 94 to 69 (ie 25 fewer openat calls). Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: James Clark <james.clark@arm.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Kan Liang <kan.liang@linux.intel.com> Link: https://lore.kernel.org/r/20230925062323.840799-1-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> |
||
---|---|---|
.. | ||
alpha | ||
arc/annotate | ||
arm | ||
arm64 | ||
csky | ||
loongarch | ||
mips | ||
parisc | ||
powerpc | ||
riscv | ||
riscv64/annotate | ||
s390 | ||
sh | ||
sparc | ||
x86 | ||
xtensa | ||
Build | ||
common.c | ||
common.h |