diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-kvm.c | 4 | ||||
-rw-r--r-- | tools/perf/builtin-record.c | 4 | ||||
-rw-r--r-- | tools/perf/builtin-stat.c | 8 | ||||
-rw-r--r-- | tools/perf/builtin-top.c | 6 | ||||
-rw-r--r-- | tools/perf/builtin-trace.c | 6 | ||||
-rw-r--r-- | tools/perf/tests/code-reading.c | 5 | ||||
-rw-r--r-- | tools/perf/tests/keep-tracking.c | 5 | ||||
-rw-r--r-- | tools/perf/tests/mmap-basic.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/open-syscall-tp-fields.c | 4 | ||||
-rw-r--r-- | tools/perf/tests/perf-record.c | 10 | ||||
-rw-r--r-- | tools/perf/tests/perf-time-to-tsc.c | 4 | ||||
-rw-r--r-- | tools/perf/tests/sw-clock.c | 10 | ||||
-rw-r--r-- | tools/perf/tests/task-exit.c | 9 | ||||
-rw-r--r-- | tools/perf/util/evlist.c | 12 | ||||
-rw-r--r-- | tools/perf/util/evlist.h | 1 |
15 files changed, 32 insertions, 58 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index a6ec1052c291..858b11bf6711 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -1556,10 +1556,8 @@ out: | |||
1556 | if (kvm->session) | 1556 | if (kvm->session) |
1557 | perf_session__delete(kvm->session); | 1557 | perf_session__delete(kvm->session); |
1558 | kvm->session = NULL; | 1558 | kvm->session = NULL; |
1559 | if (kvm->evlist) { | 1559 | if (kvm->evlist) |
1560 | perf_evlist__delete_maps(kvm->evlist); | ||
1561 | perf_evlist__delete(kvm->evlist); | 1560 | perf_evlist__delete(kvm->evlist); |
1562 | } | ||
1563 | 1561 | ||
1564 | return err; | 1562 | return err; |
1565 | } | 1563 | } |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 6dcb8aae908c..5149b41e63d1 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -964,15 +964,13 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) | |||
964 | 964 | ||
965 | if (record_opts__config(&rec->opts)) { | 965 | if (record_opts__config(&rec->opts)) { |
966 | err = -EINVAL; | 966 | err = -EINVAL; |
967 | goto out_free_fd; | 967 | goto out_symbol_exit; |
968 | } | 968 | } |
969 | 969 | ||
970 | err = __cmd_record(&record, argc, argv); | 970 | err = __cmd_record(&record, argc, argv); |
971 | 971 | ||
972 | perf_evlist__munmap(rec->evlist); | 972 | perf_evlist__munmap(rec->evlist); |
973 | perf_evlist__close(rec->evlist); | 973 | perf_evlist__close(rec->evlist); |
974 | out_free_fd: | ||
975 | perf_evlist__delete_maps(rec->evlist); | ||
976 | out_symbol_exit: | 974 | out_symbol_exit: |
977 | symbol__exit(); | 975 | symbol__exit(); |
978 | return err; | 976 | return err; |
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index f8456cad656d..6ca076660de5 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -1782,14 +1782,14 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1782 | if (interval && interval < 100) { | 1782 | if (interval && interval < 100) { |
1783 | pr_err("print interval must be >= 100ms\n"); | 1783 | pr_err("print interval must be >= 100ms\n"); |
1784 | parse_options_usage(stat_usage, options, "I", 1); | 1784 | parse_options_usage(stat_usage, options, "I", 1); |
1785 | goto out_free_maps; | 1785 | goto out; |
1786 | } | 1786 | } |
1787 | 1787 | ||
1788 | if (perf_evlist__alloc_stats(evsel_list, interval)) | 1788 | if (perf_evlist__alloc_stats(evsel_list, interval)) |
1789 | goto out_free_maps; | 1789 | goto out; |
1790 | 1790 | ||
1791 | if (perf_stat_init_aggr_mode()) | 1791 | if (perf_stat_init_aggr_mode()) |
1792 | goto out_free_maps; | 1792 | goto out; |
1793 | 1793 | ||
1794 | /* | 1794 | /* |
1795 | * We dont want to block the signals - that would cause | 1795 | * We dont want to block the signals - that would cause |
@@ -1821,8 +1821,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1821 | print_stat(argc, argv); | 1821 | print_stat(argc, argv); |
1822 | 1822 | ||
1823 | perf_evlist__free_stats(evsel_list); | 1823 | perf_evlist__free_stats(evsel_list); |
1824 | out_free_maps: | ||
1825 | perf_evlist__delete_maps(evsel_list); | ||
1826 | out: | 1824 | out: |
1827 | perf_evlist__delete(evsel_list); | 1825 | perf_evlist__delete(evsel_list); |
1828 | return status; | 1826 | return status; |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 172e91a9ce62..e0fd0aa57f06 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -1171,7 +1171,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1171 | if (!top.evlist->nr_entries && | 1171 | if (!top.evlist->nr_entries && |
1172 | perf_evlist__add_default(top.evlist) < 0) { | 1172 | perf_evlist__add_default(top.evlist) < 0) { |
1173 | ui__error("Not enough memory for event selector list\n"); | 1173 | ui__error("Not enough memory for event selector list\n"); |
1174 | goto out_delete_maps; | 1174 | goto out_delete_evlist; |
1175 | } | 1175 | } |
1176 | 1176 | ||
1177 | symbol_conf.nr_events = top.evlist->nr_entries; | 1177 | symbol_conf.nr_events = top.evlist->nr_entries; |
@@ -1181,7 +1181,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1181 | 1181 | ||
1182 | if (record_opts__config(opts)) { | 1182 | if (record_opts__config(opts)) { |
1183 | status = -EINVAL; | 1183 | status = -EINVAL; |
1184 | goto out_delete_maps; | 1184 | goto out_delete_evlist; |
1185 | } | 1185 | } |
1186 | 1186 | ||
1187 | top.sym_evsel = perf_evlist__first(top.evlist); | 1187 | top.sym_evsel = perf_evlist__first(top.evlist); |
@@ -1206,8 +1206,6 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1206 | 1206 | ||
1207 | status = __cmd_top(&top); | 1207 | status = __cmd_top(&top); |
1208 | 1208 | ||
1209 | out_delete_maps: | ||
1210 | perf_evlist__delete_maps(top.evlist); | ||
1211 | out_delete_evlist: | 1209 | out_delete_evlist: |
1212 | perf_evlist__delete(top.evlist); | 1210 | perf_evlist__delete(top.evlist); |
1213 | 1211 | ||
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 5498eacf8fc6..f4ddd14b8a9b 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -1885,7 +1885,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv) | |||
1885 | err = trace__symbols_init(trace, evlist); | 1885 | err = trace__symbols_init(trace, evlist); |
1886 | if (err < 0) { | 1886 | if (err < 0) { |
1887 | fprintf(trace->output, "Problems initializing symbol libraries!\n"); | 1887 | fprintf(trace->output, "Problems initializing symbol libraries!\n"); |
1888 | goto out_delete_maps; | 1888 | goto out_delete_evlist; |
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | perf_evlist__config(evlist, &trace->opts); | 1891 | perf_evlist__config(evlist, &trace->opts); |
@@ -1898,7 +1898,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv) | |||
1898 | argv, false, NULL); | 1898 | argv, false, NULL); |
1899 | if (err < 0) { | 1899 | if (err < 0) { |
1900 | fprintf(trace->output, "Couldn't run the workload!\n"); | 1900 | fprintf(trace->output, "Couldn't run the workload!\n"); |
1901 | goto out_delete_maps; | 1901 | goto out_delete_evlist; |
1902 | } | 1902 | } |
1903 | } | 1903 | } |
1904 | 1904 | ||
@@ -1996,8 +1996,6 @@ out_disable: | |||
1996 | perf_evlist__munmap(evlist); | 1996 | perf_evlist__munmap(evlist); |
1997 | out_close_evlist: | 1997 | out_close_evlist: |
1998 | perf_evlist__close(evlist); | 1998 | perf_evlist__close(evlist); |
1999 | out_delete_maps: | ||
2000 | perf_evlist__delete_maps(evlist); | ||
2001 | out_delete_evlist: | 1999 | out_delete_evlist: |
2002 | perf_evlist__delete(evlist); | 2000 | perf_evlist__delete(evlist); |
2003 | out: | 2001 | out: |
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index 4248d1e96848..ddbc7756620c 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c | |||
@@ -543,11 +543,10 @@ out_err: | |||
543 | perf_evlist__munmap(evlist); | 543 | perf_evlist__munmap(evlist); |
544 | perf_evlist__close(evlist); | 544 | perf_evlist__close(evlist); |
545 | perf_evlist__delete(evlist); | 545 | perf_evlist__delete(evlist); |
546 | } | 546 | } else { |
547 | if (cpus) | ||
548 | cpu_map__delete(cpus); | 547 | cpu_map__delete(cpus); |
549 | if (threads) | ||
550 | thread_map__delete(threads); | 548 | thread_map__delete(threads); |
549 | } | ||
551 | machines__destroy_kernel_maps(&machines); | 550 | machines__destroy_kernel_maps(&machines); |
552 | machine__delete_threads(machine); | 551 | machine__delete_threads(machine); |
553 | machines__exit(&machines); | 552 | machines__exit(&machines); |
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c index 27eb75142b88..f9bc1fcd17cd 100644 --- a/tools/perf/tests/keep-tracking.c +++ b/tools/perf/tests/keep-tracking.c | |||
@@ -145,11 +145,10 @@ out_err: | |||
145 | perf_evlist__munmap(evlist); | 145 | perf_evlist__munmap(evlist); |
146 | perf_evlist__close(evlist); | 146 | perf_evlist__close(evlist); |
147 | perf_evlist__delete(evlist); | 147 | perf_evlist__delete(evlist); |
148 | } | 148 | } else { |
149 | if (cpus) | ||
150 | cpu_map__delete(cpus); | 149 | cpu_map__delete(cpus); |
151 | if (threads) | ||
152 | thread_map__delete(threads); | 150 | thread_map__delete(threads); |
151 | } | ||
153 | 152 | ||
154 | return err; | 153 | return err; |
155 | } | 154 | } |
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c index d64ab79c6d35..bbb334d2a864 100644 --- a/tools/perf/tests/mmap-basic.c +++ b/tools/perf/tests/mmap-basic.c | |||
@@ -143,6 +143,8 @@ out_close_fd: | |||
143 | perf_evsel__close_fd(evsels[i], 1, threads->nr); | 143 | perf_evsel__close_fd(evsels[i], 1, threads->nr); |
144 | out_free_evlist: | 144 | out_free_evlist: |
145 | perf_evlist__delete(evlist); | 145 | perf_evlist__delete(evlist); |
146 | cpus = NULL; | ||
147 | threads = NULL; | ||
146 | out_free_cpus: | 148 | out_free_cpus: |
147 | cpu_map__delete(cpus); | 149 | cpu_map__delete(cpus); |
148 | out_free_threads: | 150 | out_free_threads: |
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c index 774620a5aecb..595b577172a6 100644 --- a/tools/perf/tests/open-syscall-tp-fields.c +++ b/tools/perf/tests/open-syscall-tp-fields.c | |||
@@ -48,7 +48,7 @@ int test__syscall_open_tp_fields(void) | |||
48 | err = perf_evlist__open(evlist); | 48 | err = perf_evlist__open(evlist); |
49 | if (err < 0) { | 49 | if (err < 0) { |
50 | pr_debug("perf_evlist__open: %s\n", strerror(errno)); | 50 | pr_debug("perf_evlist__open: %s\n", strerror(errno)); |
51 | goto out_delete_maps; | 51 | goto out_delete_evlist; |
52 | } | 52 | } |
53 | 53 | ||
54 | err = perf_evlist__mmap(evlist, UINT_MAX, false); | 54 | err = perf_evlist__mmap(evlist, UINT_MAX, false); |
@@ -114,8 +114,6 @@ out_munmap: | |||
114 | perf_evlist__munmap(evlist); | 114 | perf_evlist__munmap(evlist); |
115 | out_close_evlist: | 115 | out_close_evlist: |
116 | perf_evlist__close(evlist); | 116 | perf_evlist__close(evlist); |
117 | out_delete_maps: | ||
118 | perf_evlist__delete_maps(evlist); | ||
119 | out_delete_evlist: | 117 | out_delete_evlist: |
120 | perf_evlist__delete(evlist); | 118 | perf_evlist__delete(evlist); |
121 | out: | 119 | out: |
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c index fa0ed35afb9a..266da9d41300 100644 --- a/tools/perf/tests/perf-record.c +++ b/tools/perf/tests/perf-record.c | |||
@@ -86,7 +86,7 @@ int test__PERF_RECORD(void) | |||
86 | err = perf_evlist__prepare_workload(evlist, &opts.target, argv, false, NULL); | 86 | err = perf_evlist__prepare_workload(evlist, &opts.target, argv, false, NULL); |
87 | if (err < 0) { | 87 | if (err < 0) { |
88 | pr_debug("Couldn't run the workload!\n"); | 88 | pr_debug("Couldn't run the workload!\n"); |
89 | goto out_delete_maps; | 89 | goto out_delete_evlist; |
90 | } | 90 | } |
91 | 91 | ||
92 | /* | 92 | /* |
@@ -101,7 +101,7 @@ int test__PERF_RECORD(void) | |||
101 | err = sched__get_first_possible_cpu(evlist->workload.pid, &cpu_mask); | 101 | err = sched__get_first_possible_cpu(evlist->workload.pid, &cpu_mask); |
102 | if (err < 0) { | 102 | if (err < 0) { |
103 | pr_debug("sched__get_first_possible_cpu: %s\n", strerror(errno)); | 103 | pr_debug("sched__get_first_possible_cpu: %s\n", strerror(errno)); |
104 | goto out_delete_maps; | 104 | goto out_delete_evlist; |
105 | } | 105 | } |
106 | 106 | ||
107 | cpu = err; | 107 | cpu = err; |
@@ -111,7 +111,7 @@ int test__PERF_RECORD(void) | |||
111 | */ | 111 | */ |
112 | if (sched_setaffinity(evlist->workload.pid, cpu_mask_size, &cpu_mask) < 0) { | 112 | if (sched_setaffinity(evlist->workload.pid, cpu_mask_size, &cpu_mask) < 0) { |
113 | pr_debug("sched_setaffinity: %s\n", strerror(errno)); | 113 | pr_debug("sched_setaffinity: %s\n", strerror(errno)); |
114 | goto out_delete_maps; | 114 | goto out_delete_evlist; |
115 | } | 115 | } |
116 | 116 | ||
117 | /* | 117 | /* |
@@ -121,7 +121,7 @@ int test__PERF_RECORD(void) | |||
121 | err = perf_evlist__open(evlist); | 121 | err = perf_evlist__open(evlist); |
122 | if (err < 0) { | 122 | if (err < 0) { |
123 | pr_debug("perf_evlist__open: %s\n", strerror(errno)); | 123 | pr_debug("perf_evlist__open: %s\n", strerror(errno)); |
124 | goto out_delete_maps; | 124 | goto out_delete_evlist; |
125 | } | 125 | } |
126 | 126 | ||
127 | /* | 127 | /* |
@@ -306,8 +306,6 @@ out_err: | |||
306 | perf_evlist__munmap(evlist); | 306 | perf_evlist__munmap(evlist); |
307 | out_close_evlist: | 307 | out_close_evlist: |
308 | perf_evlist__close(evlist); | 308 | perf_evlist__close(evlist); |
309 | out_delete_maps: | ||
310 | perf_evlist__delete_maps(evlist); | ||
311 | out_delete_evlist: | 309 | out_delete_evlist: |
312 | perf_evlist__delete(evlist); | 310 | perf_evlist__delete(evlist); |
313 | out: | 311 | out: |
diff --git a/tools/perf/tests/perf-time-to-tsc.c b/tools/perf/tests/perf-time-to-tsc.c index c6398b90e897..97d08fff1f8d 100644 --- a/tools/perf/tests/perf-time-to-tsc.c +++ b/tools/perf/tests/perf-time-to-tsc.c | |||
@@ -170,10 +170,6 @@ out_err: | |||
170 | perf_evlist__close(evlist); | 170 | perf_evlist__close(evlist); |
171 | perf_evlist__delete(evlist); | 171 | perf_evlist__delete(evlist); |
172 | } | 172 | } |
173 | if (cpus) | ||
174 | cpu_map__delete(cpus); | ||
175 | if (threads) | ||
176 | thread_map__delete(threads); | ||
177 | 173 | ||
178 | return err; | 174 | return err; |
179 | } | 175 | } |
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c index 6664a7cd828c..266d38127ba6 100644 --- a/tools/perf/tests/sw-clock.c +++ b/tools/perf/tests/sw-clock.c | |||
@@ -45,7 +45,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) | |||
45 | evsel = perf_evsel__new(&attr); | 45 | evsel = perf_evsel__new(&attr); |
46 | if (evsel == NULL) { | 46 | if (evsel == NULL) { |
47 | pr_debug("perf_evsel__new\n"); | 47 | pr_debug("perf_evsel__new\n"); |
48 | goto out_free_evlist; | 48 | goto out_delete_evlist; |
49 | } | 49 | } |
50 | perf_evlist__add(evlist, evsel); | 50 | perf_evlist__add(evlist, evsel); |
51 | 51 | ||
@@ -54,7 +54,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) | |||
54 | if (!evlist->cpus || !evlist->threads) { | 54 | if (!evlist->cpus || !evlist->threads) { |
55 | err = -ENOMEM; | 55 | err = -ENOMEM; |
56 | pr_debug("Not enough memory to create thread/cpu maps\n"); | 56 | pr_debug("Not enough memory to create thread/cpu maps\n"); |
57 | goto out_delete_maps; | 57 | goto out_delete_evlist; |
58 | } | 58 | } |
59 | 59 | ||
60 | if (perf_evlist__open(evlist)) { | 60 | if (perf_evlist__open(evlist)) { |
@@ -63,7 +63,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) | |||
63 | err = -errno; | 63 | err = -errno; |
64 | pr_debug("Couldn't open evlist: %s\nHint: check %s, using %" PRIu64 " in this test.\n", | 64 | pr_debug("Couldn't open evlist: %s\nHint: check %s, using %" PRIu64 " in this test.\n", |
65 | strerror(errno), knob, (u64)attr.sample_freq); | 65 | strerror(errno), knob, (u64)attr.sample_freq); |
66 | goto out_delete_maps; | 66 | goto out_delete_evlist; |
67 | } | 67 | } |
68 | 68 | ||
69 | err = perf_evlist__mmap(evlist, 128, true); | 69 | err = perf_evlist__mmap(evlist, 128, true); |
@@ -109,9 +109,7 @@ out_unmap_evlist: | |||
109 | perf_evlist__munmap(evlist); | 109 | perf_evlist__munmap(evlist); |
110 | out_close_evlist: | 110 | out_close_evlist: |
111 | perf_evlist__close(evlist); | 111 | perf_evlist__close(evlist); |
112 | out_delete_maps: | 112 | out_delete_evlist: |
113 | perf_evlist__delete_maps(evlist); | ||
114 | out_free_evlist: | ||
115 | perf_evlist__delete(evlist); | 113 | perf_evlist__delete(evlist); |
116 | return err; | 114 | return err; |
117 | } | 115 | } |
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 44e339d4e297..fdeb2aa46a50 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c | |||
@@ -62,14 +62,14 @@ int test__task_exit(void) | |||
62 | if (!evlist->cpus || !evlist->threads) { | 62 | if (!evlist->cpus || !evlist->threads) { |
63 | err = -ENOMEM; | 63 | err = -ENOMEM; |
64 | pr_debug("Not enough memory to create thread/cpu maps\n"); | 64 | pr_debug("Not enough memory to create thread/cpu maps\n"); |
65 | goto out_delete_maps; | 65 | goto out_delete_evlist; |
66 | } | 66 | } |
67 | 67 | ||
68 | err = perf_evlist__prepare_workload(evlist, &target, argv, false, | 68 | err = perf_evlist__prepare_workload(evlist, &target, argv, false, |
69 | workload_exec_failed_signal); | 69 | workload_exec_failed_signal); |
70 | if (err < 0) { | 70 | if (err < 0) { |
71 | pr_debug("Couldn't run the workload!\n"); | 71 | pr_debug("Couldn't run the workload!\n"); |
72 | goto out_delete_maps; | 72 | goto out_delete_evlist; |
73 | } | 73 | } |
74 | 74 | ||
75 | evsel = perf_evlist__first(evlist); | 75 | evsel = perf_evlist__first(evlist); |
@@ -83,7 +83,7 @@ int test__task_exit(void) | |||
83 | err = perf_evlist__open(evlist); | 83 | err = perf_evlist__open(evlist); |
84 | if (err < 0) { | 84 | if (err < 0) { |
85 | pr_debug("Couldn't open the evlist: %s\n", strerror(-err)); | 85 | pr_debug("Couldn't open the evlist: %s\n", strerror(-err)); |
86 | goto out_delete_maps; | 86 | goto out_delete_evlist; |
87 | } | 87 | } |
88 | 88 | ||
89 | if (perf_evlist__mmap(evlist, 128, true) < 0) { | 89 | if (perf_evlist__mmap(evlist, 128, true) < 0) { |
@@ -115,8 +115,7 @@ retry: | |||
115 | perf_evlist__munmap(evlist); | 115 | perf_evlist__munmap(evlist); |
116 | out_close_evlist: | 116 | out_close_evlist: |
117 | perf_evlist__close(evlist); | 117 | perf_evlist__close(evlist); |
118 | out_delete_maps: | 118 | out_delete_evlist: |
119 | perf_evlist__delete_maps(evlist); | ||
120 | perf_evlist__delete(evlist); | 119 | perf_evlist__delete(evlist); |
121 | return err; | 120 | return err; |
122 | } | 121 | } |
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 96b3ef547db4..143eaf05178f 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -107,6 +107,10 @@ void perf_evlist__exit(struct perf_evlist *evlist) | |||
107 | 107 | ||
108 | void perf_evlist__delete(struct perf_evlist *evlist) | 108 | void perf_evlist__delete(struct perf_evlist *evlist) |
109 | { | 109 | { |
110 | cpu_map__delete(evlist->cpus); | ||
111 | thread_map__delete(evlist->threads); | ||
112 | evlist->cpus = NULL; | ||
113 | evlist->threads = NULL; | ||
110 | perf_evlist__purge(evlist); | 114 | perf_evlist__purge(evlist); |
111 | perf_evlist__exit(evlist); | 115 | perf_evlist__exit(evlist); |
112 | free(evlist); | 116 | free(evlist); |
@@ -833,14 +837,6 @@ out_delete_threads: | |||
833 | return -1; | 837 | return -1; |
834 | } | 838 | } |
835 | 839 | ||
836 | void perf_evlist__delete_maps(struct perf_evlist *evlist) | ||
837 | { | ||
838 | cpu_map__delete(evlist->cpus); | ||
839 | thread_map__delete(evlist->threads); | ||
840 | evlist->cpus = NULL; | ||
841 | evlist->threads = NULL; | ||
842 | } | ||
843 | |||
844 | int perf_evlist__apply_filters(struct perf_evlist *evlist) | 840 | int perf_evlist__apply_filters(struct perf_evlist *evlist) |
845 | { | 841 | { |
846 | struct perf_evsel *evsel; | 842 | struct perf_evsel *evsel; |
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 18d1222c0762..518e521c801d 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h | |||
@@ -135,7 +135,6 @@ static inline void perf_evlist__set_maps(struct perf_evlist *evlist, | |||
135 | } | 135 | } |
136 | 136 | ||
137 | int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target); | 137 | int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target); |
138 | void perf_evlist__delete_maps(struct perf_evlist *evlist); | ||
139 | int perf_evlist__apply_filters(struct perf_evlist *evlist); | 138 | int perf_evlist__apply_filters(struct perf_evlist *evlist); |
140 | 139 | ||
141 | void __perf_evlist__set_leader(struct list_head *list); | 140 | void __perf_evlist__set_leader(struct list_head *list); |