]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf test: Switch cycles event to cpu-cycles
authorIan Rogers <irogers@google.com>
Sun, 5 Oct 2025 18:24:27 +0000 (11:24 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 15 Oct 2025 14:59:12 +0000 (23:59 +0900)
commit4bebf7ff3e6a13bb0d3378e143efb86cd73d0c76
treea112484f8c085e423461905c2f58fe11b07dc14e
parentd47c65eea8acd13a32a8d0caa3bae9a611b09ac8
perf test: Switch cycles event to cpu-cycles

Without a PMU perf matches an event against any PMU with the
event. Unfortunately some PMU drivers advertise a "cycles" event which
is typically just a core event. As tests assume a core event, switch
to use "cpu-cycles" that avoids the overloaded "cycles" event on
troublesome PMUs and is so far not overloaded. Note, on x86 this
changes a legacy event into a sysfs one.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/tests/code-reading.c
tools/perf/tests/keep-tracking.c
tools/perf/tests/perf-time-to-tsc.c
tools/perf/tests/switch-tracking.c