diff mbox series

[v1,5/9] perf cs-etm: Remove the 'pmu_type' field

Message ID 20240806204130.720977-6-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 in the Arm CoreSight layer to
detect the enabled AUX events. So the 'pmu_type' field is not used,
remove it.

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

Patch

diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index dac0f7c7e44d..13050b1919c8 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -77,7 +77,6 @@  struct cs_etm_auxtrace {
 	u64 instructions_sample_period;
 	u64 instructions_id;
 	u64 **metadata;
-	unsigned int pmu_type;
 	enum cs_etm_pid_fmt pid_fmt;
 };
 
@@ -1629,7 +1628,7 @@  static int cs_etm__synth_events(struct cs_etm_auxtrace *etm,
 	int err;
 
 	evlist__for_each_entry(evlist, evsel) {
-		if (evsel->core.attr.type == etm->pmu_type) {
+		if (evsel__is_aux_event(evsel)) {
 			found = true;
 			break;
 		}
@@ -3338,7 +3337,6 @@  int cs_etm__process_auxtrace_info_full(union perf_event *event,
 	etm->session = session;
 
 	etm->num_cpu = num_cpu;
-	etm->pmu_type = (unsigned int) ((ptr[CS_PMU_TYPE_CPUS] >> 32) & 0xffffffff);
 	etm->snapshot_mode = (ptr[CS_ETM_SNAPSHOT] != 0);
 	etm->metadata = metadata;
 	etm->auxtrace_type = auxtrace_info->type;