Commit c87826dd authored by Leo Yan's avatar Leo Yan Committed by Arnaldo Carvalho de Melo

perf auxtrace: Use evsel__is_aux_event() for checking AUX event

Use evsel__is_aux_event() to decide if an event is a AUX event, this is
a refactoring to replace comparing the PMU type.
Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarLeo Yan <leo.yan@arm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20240806204130.720977-2-leo.yan@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent aea4d463
...@@ -671,11 +671,11 @@ int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx) ...@@ -671,11 +671,11 @@ int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx)
{ {
struct evsel *evsel; struct evsel *evsel;
if (!itr->evlist || !itr->pmu) if (!itr->evlist)
return -EINVAL; return -EINVAL;
evlist__for_each_entry(itr->evlist, evsel) { evlist__for_each_entry(itr->evlist, evsel) {
if (evsel->core.attr.type == itr->pmu->type) { if (evsel__is_aux_event(evsel)) {
if (evsel->disabled) if (evsel->disabled)
return 0; return 0;
return evlist__enable_event_idx(itr->evlist, evsel, idx); return evlist__enable_event_idx(itr->evlist, evsel, idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment