Skip to content

Commit c87826d

Browse files
Leo-Yanacmel
authored andcommitted
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: 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]>
1 parent aea4d46 commit c87826d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/perf/util/auxtrace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,11 +671,11 @@ int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx)
671671
{
672672
struct evsel *evsel;
673673

674-
if (!itr->evlist || !itr->pmu)
674+
if (!itr->evlist)
675675
return -EINVAL;
676676

677677
evlist__for_each_entry(itr->evlist, evsel) {
678-
if (evsel->core.attr.type == itr->pmu->type) {
678+
if (evsel__is_aux_event(evsel)) {
679679
if (evsel->disabled)
680680
return 0;
681681
return evlist__enable_event_idx(itr->evlist, evsel, idx);

0 commit comments

Comments
 (0)