diff mbox series

[v1,7/9] perf intel-bts: Remove the 'pmu_type' field

Message ID 20240806204130.720977-8-leo.yan@arm.com (mailing list archive)
State New, archived
Headers show
Series perf auxtrace: Refactor with evsel__is_aux_event() | expand

Commit Message

Leo Yan Aug. 6, 2024, 8:41 p.m. UTC
Use the evsel__is_aux_event() function to detect the enabled AUX events.
The 'pmu_type' field is not used, remove it.

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
 tools/perf/util/intel-bts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c
index 2b571e56f9c9..93f3452f8220 100644
--- a/tools/perf/util/intel-bts.c
+++ b/tools/perf/util/intel-bts.c
@@ -51,7 +51,6 @@  struct intel_bts {
 	bool				sampling_mode;
 	bool				snapshot_mode;
 	bool				data_queued;
-	u32				pmu_type;
 	struct perf_tsc_conversion	tc;
 	bool				cap_user_time_zero;
 	struct itrace_synth_opts	synth_opts;
@@ -768,7 +767,7 @@  static int intel_bts_synth_events(struct intel_bts *bts,
 	int err;
 
 	evlist__for_each_entry(evlist, evsel) {
-		if (evsel->core.attr.type == bts->pmu_type && evsel->core.ids) {
+		if (evsel__is_aux_event(evsel) && evsel->core.ids) {
 			found = true;
 			break;
 		}
@@ -868,7 +867,6 @@  int intel_bts_process_auxtrace_info(union perf_event *event,
 	bts->session = session;
 	bts->machine = &session->machines.host; /* No kvm support */
 	bts->auxtrace_type = auxtrace_info->type;
-	bts->pmu_type = auxtrace_info->priv[INTEL_BTS_PMU_TYPE];
 	bts->tc.time_shift = auxtrace_info->priv[INTEL_BTS_TIME_SHIFT];
 	bts->tc.time_mult = auxtrace_info->priv[INTEL_BTS_TIME_MULT];
 	bts->tc.time_zero = auxtrace_info->priv[INTEL_BTS_TIME_ZERO];