diff options
Diffstat (limited to 'tools/perf/util/pmu.c')
-rw-r--r-- | tools/perf/util/pmu.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index f32b710347db..b7da21a7d627 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -15,6 +15,7 @@ #include <api/fs/fs.h> #include <locale.h> #include <regex.h> +#include <perf/cpumap.h> #include "pmu.h" #include "parse-events.h" #include "cpumap.h" @@ -572,16 +573,16 @@ static void pmu_read_sysfs(void) closedir(dir); } -static struct cpu_map *__pmu_cpumask(const char *path) +static struct perf_cpu_map *__pmu_cpumask(const char *path) { FILE *file; - struct cpu_map *cpus; + struct perf_cpu_map *cpus; file = fopen(path, "r"); if (!file) return NULL; - cpus = cpu_map__read(file); + cpus = perf_cpu_map__read(file); fclose(file); return cpus; } @@ -593,10 +594,10 @@ static struct cpu_map *__pmu_cpumask(const char *path) #define CPUS_TEMPLATE_UNCORE "%s/bus/event_source/devices/%s/cpumask" #define CPUS_TEMPLATE_CPU "%s/bus/event_source/devices/%s/cpus" -static struct cpu_map *pmu_cpumask(const char *name) +static struct perf_cpu_map *pmu_cpumask(const char *name) { char path[PATH_MAX]; - struct cpu_map *cpus; + struct perf_cpu_map *cpus; const char *sysfs = sysfs__mountpoint(); const char *templates[] = { CPUS_TEMPLATE_UNCORE, @@ -621,12 +622,12 @@ static struct cpu_map *pmu_cpumask(const char *name) static bool pmu_is_uncore(const char *name) { char path[PATH_MAX]; - struct cpu_map *cpus; + struct perf_cpu_map *cpus; const char *sysfs = sysfs__mountpoint(); snprintf(path, PATH_MAX, CPUS_TEMPLATE_UNCORE, sysfs, name); cpus = __pmu_cpumask(path); - cpu_map__put(cpus); + perf_cpu_map__put(cpus); return !!cpus; } |