aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 2d948ad471f4..3a142e90d609 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -982,3 +982,14 @@ int perf_evsel_list__create_default(void)
982 ++nr_counters; 982 ++nr_counters;
983 return 0; 983 return 0;
984} 984}
985
986void perf_evsel_list__delete(void)
987{
988 struct perf_evsel *pos, *n;
989
990 list_for_each_entry_safe(pos, n, &evsel_list, node) {
991 list_del_init(&pos->node);
992 perf_evsel__delete(pos);
993 }
994 nr_counters = 0;
995}