[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240806204130.720977-5-leo.yan@arm.com>
Date: Tue, 6 Aug 2024 21:41:25 +0100
From: Leo Yan <leo.yan@....com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
James Clark <james.clark@...aro.org>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
coresight@...ts.linaro.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
"Liang, Kan" <kan.liang@...ux.intel.com>
Cc: Leo Yan <leo.yan@....com>
Subject: [PATCH v1 4/9] perf arm-spe: Remove the 'pmu_type' field
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@....com>
---
tools/perf/util/arm-spe.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index 27e393a0beec..213320cfcea7 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -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);
--
2.34.1
Powered by blists - more mailing lists