@@ -45,7 +45,6 @@ struct arm_spe {
u32 auxtrace_type;
struct perf_session *session;
struct machine *machine;
- u32 pmu_type;
u64 midr;
struct perf_tsc_conversion tc;
@@ -1120,7 +1119,7 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf_session *session)
int err;
evlist__for_each_entry(evlist, evsel) {
- if (evsel->core.attr.type == spe->pmu_type) {
+ if (evsel__is_aux_event(evsel)) {
found = true;
break;
}
@@ -1305,7 +1304,6 @@ int arm_spe_process_auxtrace_info(union perf_event *event,
spe->session = session;
spe->machine = &session->machines.host; /* No kvm support */
spe->auxtrace_type = auxtrace_info->type;
- spe->pmu_type = auxtrace_info->priv[ARM_SPE_PMU_TYPE];
spe->midr = midr;
spe->timeless_decoding = arm_spe__is_timeless_decoding(spe);
Use the evsel__is_aux_event() function in the Arm SPE layer to detected the enabled AUX events. It is safe for this change as it is no chance for mixing AUX events and only the same kind of AUX events are enabled during the initialization. After the refactoring, the 'pmu_type' field is not used, so remove it. Signed-off-by: Leo Yan <leo.yan@arm.com> --- tools/perf/util/arm-spe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)