mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

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>
19 lines
446 B
C
19 lines
446 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef PERF_AFFINITY_H
|
|
#define PERF_AFFINITY_H 1
|
|
|
|
#include <stdbool.h>
|
|
|
|
struct perf_cpu_map;
|
|
struct affinity {
|
|
unsigned long *orig_cpus;
|
|
unsigned long *sched_cpus;
|
|
bool changed;
|
|
};
|
|
|
|
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
|