summaryrefslogtreecommitdiff
path: root/tools/perf/util/pfm.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/pfm.c')
-rw-r--r--tools/perf/util/pfm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/pfm.c b/tools/perf/util/pfm.c
index d9043f4afbe7..f80d6b0df47a 100644
--- a/tools/perf/util/pfm.c
+++ b/tools/perf/util/pfm.c
@@ -85,7 +85,7 @@ int parse_libpfm_events_option(const struct option *opt, const char *str,
}
pmu = perf_pmus__find_by_type((unsigned int)attr.type);
- evsel = parse_events__add_event(evlist->core.nr_entries,
+ evsel = parse_events__add_event(evlist__nr_entries(evlist),
&attr, q, /*metric_id=*/NULL,
pmu);
if (evsel == NULL)
@@ -159,7 +159,7 @@ static bool is_libpfm_event_supported(const char *name, struct perf_cpu_map *cpu
result = false;
evsel__close(evsel);
- evsel__delete(evsel);
+ evsel__put(evsel);
return result;
}