summaryrefslogtreecommitdiff
path: root/tools/perf/util/affinity.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2025-06-13 17:45:28 -0700
committerNamhyung Kim <namhyung@kernel.org>2025-06-20 13:14:07 -0700
commit588d22b40480bca9efdb6e24d253baaa5165884c (patch)
tree1bf41000d0fe1b511ea6a83c1b227451663ea451 /tools/perf/util/affinity.h
parentce3d5af2a92bd6cd775ce819f5e83857e8a277fb (diff)
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>
Diffstat (limited to 'tools/perf/util/affinity.h')
-rw-r--r--tools/perf/util/affinity.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/affinity.h b/tools/perf/util/affinity.h
index 0ad6a18ef20c..7341194b2298 100644
--- a/tools/perf/util/affinity.h
+++ b/tools/perf/util/affinity.h
@@ -4,6 +4,7 @@
#include <stdbool.h>
+struct perf_cpu_map;
struct affinity {
unsigned long *orig_cpus;
unsigned long *sched_cpus;
@@ -13,5 +14,6 @@ struct affinity {
void affinity__cleanup(struct affinity *a);
void affinity__set(struct affinity *a, int cpu);
int affinity__setup(struct affinity *a);
+void cpu_map__set_affinity(const struct perf_cpu_map *cpumap);
#endif // PERF_AFFINITY_H