summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2025-05-09 14:30:17 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-19 16:33:36 +0200
commit491c4eed60fa6010b9393121bdff3e57206ba037 (patch)
tree7a7f4c0a16505b10d8af0ca64f90cd6f799abbba /tools
parent20027d8416a48a98e429d8828cb7c8fc65f15679 (diff)
downloadlinux-491c4eed60fa6010b9393121bdff3e57206ba037.tar.gz
linux-491c4eed60fa6010b9393121bdff3e57206ba037.tar.bz2
linux-491c4eed60fa6010b9393121bdff3e57206ba037.zip
perf test: Update sysfs path for core PMU caps
[ Upstream commit b9228817127430356c929847f111197776201225 ] While CPU is a system device, it'd be better to use a path for event_source devices when it checks PMU capability. Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250509213017.204343-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Stable-dep-of: 48314d20fe46 ("perf test shell lbr: Avoid failures with perf event paranoia") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/perf/tests/shell/record_lbr.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/record_lbr.sh b/tools/perf/tests/shell/record_lbr.sh
index 32314641217e..ab6f2825f790 100755
--- a/tools/perf/tests/shell/record_lbr.sh
+++ b/tools/perf/tests/shell/record_lbr.sh
@@ -4,7 +4,8 @@
set -e
-if [ ! -f /sys/devices/cpu/caps/branches ] && [ ! -f /sys/devices/cpu_core/caps/branches ]
+if [ ! -f /sys/bus/event_source/devices/cpu/caps/branches ] &&
+ [ ! -f /sys/bus/event_source/devices/cpu_core/caps/branches ]
then
echo "Skip: only x86 CPUs support LBR"
exit 2