diff options
| -rw-r--r-- | tools/perf/util/pmu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 6199a3174ab9..e0429f4ef335 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c | |||
| @@ -732,10 +732,20 @@ static void pmu_add_cpu_aliases(struct list_head *head, struct perf_pmu *pmu) | |||
| 732 | 732 | ||
| 733 | if (!is_arm_pmu_core(name)) { | 733 | if (!is_arm_pmu_core(name)) { |
| 734 | pname = pe->pmu ? pe->pmu : "cpu"; | 734 | pname = pe->pmu ? pe->pmu : "cpu"; |
| 735 | |||
| 736 | /* | ||
| 737 | * uncore alias may be from different PMU | ||
| 738 | * with common prefix | ||
| 739 | */ | ||
| 740 | if (pmu_is_uncore(name) && | ||
| 741 | !strncmp(pname, name, strlen(pname))) | ||
| 742 | goto new_alias; | ||
| 743 | |||
| 735 | if (strcmp(pname, name)) | 744 | if (strcmp(pname, name)) |
| 736 | continue; | 745 | continue; |
| 737 | } | 746 | } |
| 738 | 747 | ||
| 748 | new_alias: | ||
| 739 | /* need type casts to override 'const' */ | 749 | /* need type casts to override 'const' */ |
| 740 | __perf_pmu__new_alias(head, NULL, (char *)pe->name, | 750 | __perf_pmu__new_alias(head, NULL, (char *)pe->name, |
| 741 | (char *)pe->desc, (char *)pe->event, | 751 | (char *)pe->desc, (char *)pe->event, |
