Skip to content

Commit

Permalink
perf auxtrace: Use evsel__is_aux_event() for checking AUX event
Browse files Browse the repository at this point in the history
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: Adrian Hunter <[email protected]>
Signed-off-by: Leo Yan <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: James Clark <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Suzuki Poulouse <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
Leo-Yan authored and acmel committed Aug 28, 2024
1 parent aea4d46 commit c87826d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/util/auxtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,11 @@ int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx)
{
struct evsel *evsel;

if (!itr->evlist || !itr->pmu)
if (!itr->evlist)
return -EINVAL;

evlist__for_each_entry(itr->evlist, evsel) {
if (evsel->core.attr.type == itr->pmu->type) {
if (evsel__is_aux_event(evsel)) {
if (evsel->disabled)
return 0;
return evlist__enable_event_idx(itr->evlist, evsel, idx);
Expand Down

0 comments on commit c87826d

Please sign in to comment.