diff options
Diffstat (limited to 'tools/perf/util/pmu.c')
-rw-r--r-- | tools/perf/util/pmu.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 9dc3506d23fc..79242cf9bb79 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -501,10 +501,16 @@ static void pmu_add_cpu_aliases(struct list_head *head) struct pmu_event *pe; char *cpuid; - cpuid = get_cpuid_str(); + cpuid = getenv("PERF_CPUID"); + if (cpuid) + cpuid = strdup(cpuid); + if (!cpuid) + cpuid = get_cpuid_str(); if (!cpuid) return; + pr_debug("Using CPUID %s\n", cpuid); + i = 0; while (1) { map = &pmu_events_map[i++]; |