[PATCH v1 7/9] perf intel-bts: Remove the 'pmu_type' field
From: Leo Yan
Date: Tue Aug 06 2024 - 16:43:33 EST
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@xxxxxxx>
---
tools/perf/util/intel-bts.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
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];
--
2.34.1