perf test: Expand user space event reading (rdpmc) tests
authorIan Rogers <irogers@google.com>
Sat, 14 Jun 2025 00:45:28 +0000 (17:45 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 20 Jun 2025 20:14:07 +0000 (13:14 -0700)
commit588d22b40480bca9efdb6e24d253baaa5165884c
tree1bf41000d0fe1b511ea6a83c1b227451663ea451
parentce3d5af2a92bd6cd775ce819f5e83857e8a277fb
perf test: Expand user space event reading (rdpmc) tests

Test that disabling rdpmc support via /sys/bus/event_source/cpu*/rdpmc
disables reading in the mmap (libperf read support will fallback to
using a system call).
Test all hybrid PMUs support rdpmc.
Ensure hybrid PMUs use the correct CPU to rdpmc the correct
event. Previously the test would open cycles or instructions with no
extended type then rdpmc it on whatever CPU. This could fail/skip due
to which CPU the test was scheduled upon.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20250614004528.1652860-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/tests/mmap-basic.c
tools/perf/tests/tests.h
tools/perf/util/affinity.c
tools/perf/util/affinity.h