diff options
-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) | |||
501 | struct pmu_event *pe; | 501 | struct pmu_event *pe; |
502 | char *cpuid; | 502 | char *cpuid; |
503 | 503 | ||
504 | cpuid = get_cpuid_str(); | 504 | cpuid = getenv("PERF_CPUID"); |
505 | if (cpuid) | ||
506 | cpuid = strdup(cpuid); | ||
507 | if (!cpuid) | ||
508 | cpuid = get_cpuid_str(); | ||
505 | if (!cpuid) | 509 | if (!cpuid) |
506 | return; | 510 | return; |
507 | 511 | ||
512 | pr_debug("Using CPUID %s\n", cpuid); | ||
513 | |||
508 | i = 0; | 514 | i = 0; |
509 | while (1) { | 515 | while (1) { |
510 | map = &pmu_events_map[i++]; | 516 | map = &pmu_events_map[i++]; |