File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -727,14 +727,21 @@ struct perf_pmu *evsel__find_pmu(const struct evsel *evsel)
727
727
legacy_core_type =
728
728
evsel -> core .attr .type == PERF_TYPE_HARDWARE ||
729
729
evsel -> core .attr .type == PERF_TYPE_HW_CACHE ;
730
- if (!pmu && legacy_core_type ) {
731
- if (perf_pmus__supports_extended_type ()) {
732
- u32 type = evsel -> core .attr .config >> PERF_PMU_TYPE_SHIFT ;
730
+ if (!pmu && legacy_core_type && perf_pmus__supports_extended_type ()) {
731
+ u32 type = evsel -> core .attr .config >> PERF_PMU_TYPE_SHIFT ;
733
732
734
- pmu = perf_pmus__find_by_type (type );
735
- } else {
736
- pmu = perf_pmus__find_core_pmu ();
737
- }
733
+ pmu = perf_pmus__find_by_type (type );
734
+ }
735
+ if (!pmu && (legacy_core_type || evsel -> core .attr .type == PERF_TYPE_RAW )) {
736
+ /*
737
+ * For legacy events, if there was no extended type info then
738
+ * assume the PMU is the first core PMU.
739
+ *
740
+ * On architectures like ARM there is no sysfs PMU with type
741
+ * PERF_TYPE_RAW, assume the RAW events are going to be handled
742
+ * by the first core PMU.
743
+ */
744
+ pmu = perf_pmus__find_core_pmu ();
738
745
}
739
746
((struct evsel * )evsel )-> pmu = pmu ;
740
747
return pmu ;
You can’t perform that action at this time.
0 commit comments