perf evlist: Rename perf_evlist__delete() to evlist__delete()
authorJiri Olsa <jolsa@kernel.org>
Sun, 21 Jul 2019 11:23:56 +0000 (13:23 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Jul 2019 21:34:43 +0000 (18:34 -0300)
Rename perf_evlist__delete() to evlist__delete(), so we don't have a
name clash when we add perf_evlist__delete() in libperf.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190721112506.12306-10-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
32 files changed:
tools/perf/arch/x86/tests/intel-cqm.c
tools/perf/arch/x86/tests/perf-time-to-tsc.c
tools/perf/builtin-ftrace.c
tools/perf/builtin-kvm.c
tools/perf/builtin-record.c
tools/perf/builtin-stat.c
tools/perf/builtin-top.c
tools/perf/builtin-trace.c
tools/perf/tests/backward-ring-buffer.c
tools/perf/tests/bpf.c
tools/perf/tests/code-reading.c
tools/perf/tests/event-times.c
tools/perf/tests/evsel-roundtrip-name.c
tools/perf/tests/hists_cumulate.c
tools/perf/tests/hists_filter.c
tools/perf/tests/hists_link.c
tools/perf/tests/hists_output.c
tools/perf/tests/keep-tracking.c
tools/perf/tests/mmap-basic.c
tools/perf/tests/openat-syscall-tp-fields.c
tools/perf/tests/parse-events.c
tools/perf/tests/parse-no-sample-id-all.c
tools/perf/tests/perf-record.c
tools/perf/tests/sw-clock.c
tools/perf/tests/switch-tracking.c
tools/perf/tests/task-exit.c
tools/perf/util/data-convert-bt.c
tools/perf/util/evlist.c
tools/perf/util/evlist.h
tools/perf/util/header.c
tools/perf/util/parse-events.c
tools/perf/util/record.c

index 8089a33c6c164781eef8683dd520820816fe0462..2a105e3b2ad177774be71841945304165781c16e 100644 (file)
@@ -124,6 +124,6 @@ int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subt
        kill(pid, SIGKILL);
        wait(NULL);
 out:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return err;
 }
index da9a3302d8e64fde99b5f9f5dfb3f34515d56d51..09b6cef76f5b85404db95a872b03b5fcbfbc5397 100644 (file)
@@ -163,6 +163,6 @@ next_event:
        err = 0;
 
 out_err:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return err;
 }
index b8bdc593e5b8fddda6095bffdde1608bc0e5a4cd..105ef2a17a9c256c5c86c99cbafd5f62d5a3dee7 100644 (file)
@@ -508,7 +508,7 @@ int cmd_ftrace(int argc, const char **argv)
        ret = __cmd_ftrace(&ftrace, argc, argv);
 
 out_delete_evlist:
-       perf_evlist__delete(ftrace.evlist);
+       evlist__delete(ftrace.evlist);
 
 out_delete_filters:
        delete_filter_func(&ftrace.filters);
index ee896b8a9fe881747f98893fc78ccc33a8f2af74..8f54bdfb5743f25a6fc7ce8aecb598f98a210023 100644 (file)
@@ -1325,7 +1325,7 @@ static struct evlist *kvm_live_event_list(void)
 
 out:
        if (err) {
-               perf_evlist__delete(evlist);
+               evlist__delete(evlist);
                evlist = NULL;
        }
 
@@ -1460,7 +1460,7 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
 out:
        perf_session__delete(kvm->session);
        kvm->session = NULL;
-       perf_evlist__delete(kvm->evlist);
+       evlist__delete(kvm->evlist);
 
        return err;
 }
index e8aa8a078dffb5f4fb75c8d12a44fae352018750..06966a2c2cdddadc8de8953d07269a9e5b435377 100644 (file)
@@ -2449,7 +2449,7 @@ int cmd_record(int argc, const char **argv)
 
        err = __cmd_record(&record, argc, argv);
 out:
-       perf_evlist__delete(rec->evlist);
+       evlist__delete(rec->evlist);
        symbol__exit();
        auxtrace_record__free(rec->itr);
        return err;
index ee0dc8088ac080fe0c92c898de8728ca245fc7ff..d28d4d71d9b7ce03e7b665dd3333563aa16c5371 100644 (file)
@@ -2015,7 +2015,7 @@ out:
        if (smi_cost && smi_reset)
                sysfs__write_int(FREEZE_ON_SMI_PATH, 0);
 
-       perf_evlist__delete(evsel_list);
+       evlist__delete(evsel_list);
 
        runtime_stat_delete(&stat_config);
 
index e4b7146cd6660274f341e664fc5ac94ae247f08a..6c0c2b78093aa00d0628fd577649a1c9747118f0 100644 (file)
@@ -1661,7 +1661,7 @@ int cmd_top(int argc, const char **argv)
                perf_evlist__stop_sb_thread(sb_evlist);
 
 out_delete_evlist:
-       perf_evlist__delete(top.evlist);
+       evlist__delete(top.evlist);
        perf_session__delete(top.session);
 
        return status;
index 767b04eaaf451f4992934e495b316f577636388c..e133204b3bb9d7369d2c15c2d351bd9e17b415af 100644 (file)
@@ -3498,7 +3498,7 @@ out_disable:
 out_delete_evlist:
        trace__symbols__exit(trace);
 
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        cgroup__put(trace->cgroup);
        trace->evlist = NULL;
        trace->live = false;
index 3883b315b25be804f50caa520d1372cb33c89f75..ef3c6db2fae4117ee8668ee007dbf9956a6e8423 100644 (file)
@@ -150,6 +150,6 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
 
        ret = TEST_OK;
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return ret;
 }
index d15f62dc426114f1070efb404c9ff88d8d300349..313ff1aadd9c1c0b0cce53b611f86ab464bddc05 100644 (file)
@@ -200,7 +200,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
        ret = TEST_OK;
 
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return ret;
 }
 
index dd0325eabc2560246a2eeb7a72ff19ff4b7177cf..1c7f092a73882839b2d9e6606e582a1ffb411401 100644 (file)
@@ -658,7 +658,7 @@ static int do_test_code_reading(bool try_kcore)
                                cpu_map__get(cpus);
                                thread_map__get(threads);
                                perf_evlist__set_maps(evlist, NULL, NULL);
-                               perf_evlist__delete(evlist);
+                               evlist__delete(evlist);
                                evlist = NULL;
                                continue;
                        }
@@ -703,7 +703,7 @@ out_put:
 out_err:
 
        if (evlist) {
-               perf_evlist__delete(evlist);
+               evlist__delete(evlist);
        } else {
                cpu_map__put(cpus);
                thread_map__put(threads);
index 8d3cf9792d9e681c8f8195cab7c639c439c8f283..0f74ca103c41b0adb2e16bed993e450c7c7c95ca 100644 (file)
@@ -204,7 +204,7 @@ static int test_times(int (attach)(struct evlist *),
                 count.ena, count.run);
 
 out_err:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return !err ? TEST_OK : TEST_FAIL;
 }
 
index 74e79d6b7e96e3f5095654eb25a8905c3ff39c02..5330f106a6ee440a20271f49228fb6005804e2af 100644 (file)
@@ -60,7 +60,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
                }
        }
 
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return ret;
 }
 
@@ -91,7 +91,7 @@ static int __perf_evsel__name_array_test(const char *names[], int nr_names)
        }
 
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return err;
 }
 
index 897e74b5ed1fae9c3954f24984fb05f45a3fd2bd..1f3de85ae18b52ebce95cda24a80d2dfbf9b90df 100644 (file)
@@ -731,7 +731,7 @@ int test__hists_cumulate(struct test *test __maybe_unused, int subtest __maybe_u
 
 out:
        /* tear down everything */
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        machines__exit(&machines);
 
        return err;
index b0468db74ca37fd3acd24255b4622f2547722081..a274716fc4384e19f5fc8482116bc4ee6392ad77 100644 (file)
@@ -321,7 +321,7 @@ int test__hists_filter(struct test *test __maybe_unused, int subtest __maybe_unu
 
 out:
        /* tear down everything */
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        reset_output_field();
        machines__exit(&machines);
 
index 878cb5bfbe785492552dbc6d955b1a645ec6deaa..b25383aa2e6e7b10a8f07c226a20b72ed694b611 100644 (file)
@@ -334,7 +334,7 @@ int test__hists_link(struct test *test __maybe_unused, int subtest __maybe_unuse
 
 out:
        /* tear down everything */
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        reset_output_field();
        machines__exit(&machines);
 
index 87a05e7afb7e4cbbdef0b241162b519f40a1d5aa..009888adf4b382ce7dd8ed146616e60dc049b4bd 100644 (file)
@@ -618,7 +618,7 @@ int test__hists_output(struct test *test __maybe_unused, int subtest __maybe_unu
 
 out:
        /* tear down everything */
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        machines__exit(&machines);
 
        return err;
index 4c73377bfccb1090b5540a6c241fd332ec98551f..cdc19bcc7523200fb16afe11c03f0f2616191435 100644 (file)
@@ -147,7 +147,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 out_err:
        if (evlist) {
                perf_evlist__disable(evlist);
-               perf_evlist__delete(evlist);
+               evlist__delete(evlist);
        } else {
                cpu_map__put(cpus);
                thread_map__put(threads);
index 8d1be34fd951632e31d86c9894925e3a1e531ce8..7f96bb72f7e5f18cefa7a3cedfab1260fd7c7e4b 100644 (file)
@@ -151,7 +151,7 @@ out_init:
        }
 
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        cpus    = NULL;
        threads = NULL;
 out_free_cpus:
index 14159243752022da356022e3031c5ff58a01981a..0263420f4495061cef712b4606af46e37ab80652 100644 (file)
@@ -134,7 +134,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
 out_ok:
        err = 0;
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
 out:
        return err;
 }
index 6e81a930b2244df6a16cd621d5fd133f9f65b3c9..2365dd655c880fc74f8ef04f60c60da2bf9d4062 100644 (file)
@@ -1790,7 +1790,7 @@ static int test_event(struct evlist_test *e)
                ret = e->check(evlist);
        }
 
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
 
        return ret;
 }
index fc0213246aaf2d4c0f0c2a23ffd9894ed6b5fdb0..396e40d68922f45992a86ca417c0ae0b040f4880 100644 (file)
@@ -46,7 +46,7 @@ static int process_events(union perf_event **events, size_t count)
        for (i = 0; i < count && !err; i++)
                err = process_event(&evlist, events[i]);
 
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
 
        return err;
 }
index 99b2d26881f92140f39fc155f1e8704822ffa4b0..779d5996428be77ba4ba21f98a7c5fe3b388592d 100644 (file)
@@ -325,7 +325,7 @@ found_exit:
                ++errs;
        }
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
 out:
        return (err < 0 || errs > 0) ? -1 : 0;
 }
index 88a75cbae2306e0418aa05e296c80bd4bff148fd..1c7d8adb43d0a72af1ec117184469ce3da2b1dfb 100644 (file)
@@ -128,7 +128,7 @@ out_free_maps:
        cpu_map__put(cpus);
        thread_map__put(threads);
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return err;
 }
 
index 89bc20b2178a83595200632081f866cdf5a0999c..ac5da4fd222fa07f5f22820f0fdcf2dd4b6b3462 100644 (file)
@@ -567,7 +567,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
 out:
        if (evlist) {
                perf_evlist__disable(evlist);
-               perf_evlist__delete(evlist);
+               evlist__delete(evlist);
        } else {
                cpu_map__put(cpus);
                thread_map__put(threads);
index 5c2cdb0ccb961ba65234545ac0a3e4fd916af9a8..698ee5369c0216dc66f1481a99fd97ae1cc2906b 100644 (file)
@@ -138,6 +138,6 @@ out_free_maps:
        cpu_map__put(cpus);
        thread_map__put(threads);
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return err;
 }
index 083101ae7b7725f8bfc5e55dfe0f63ef33edafd5..ca30bb25b3c5ffa47d156644e27c9a8540a00445 100644 (file)
@@ -1319,7 +1319,7 @@ static void cleanup_events(struct perf_session *session)
                zfree(&evsel->priv);
        }
 
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        session->evlist = NULL;
 }
 
index 317b2d64ba6d93644dac091688a664c497ffa51b..9fa3663068b48e5514bfdd977d124477da80096a 100644 (file)
@@ -70,7 +70,7 @@ struct evlist *perf_evlist__new_default(void)
        struct evlist *evlist = evlist__new();
 
        if (evlist && perf_evlist__add_default(evlist)) {
-               perf_evlist__delete(evlist);
+               evlist__delete(evlist);
                evlist = NULL;
        }
 
@@ -82,7 +82,7 @@ struct evlist *perf_evlist__new_dummy(void)
        struct evlist *evlist = evlist__new();
 
        if (evlist && perf_evlist__add_dummy(evlist)) {
-               perf_evlist__delete(evlist);
+               evlist__delete(evlist);
                evlist = NULL;
        }
 
@@ -134,7 +134,7 @@ void perf_evlist__exit(struct evlist *evlist)
        fdarray__exit(&evlist->pollfd);
 }
 
-void perf_evlist__delete(struct evlist *evlist)
+void evlist__delete(struct evlist *evlist)
 {
        if (evlist == NULL)
                return;
@@ -1859,7 +1859,7 @@ int perf_evlist__add_sb_event(struct evlist **evlist,
 
 out_err:
        if (new_evlist) {
-               perf_evlist__delete(*evlist);
+               evlist__delete(*evlist);
                *evlist = NULL;
        }
        return -1;
@@ -1938,7 +1938,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist,
        return 0;
 
 out_delete_evlist:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        evlist = NULL;
        return -1;
 }
@@ -1949,5 +1949,5 @@ void perf_evlist__stop_sb_thread(struct evlist *evlist)
                return;
        evlist->thread.done = 1;
        pthread_join(evlist->thread.th, NULL);
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
 }
index 60e1c9268e9e67b3024f56f42c6fa81e731cd0aa..12a5fd6972df8602b53fb27a056dd694c643f4ef 100644 (file)
@@ -71,7 +71,7 @@ struct evlist *perf_evlist__new_dummy(void);
 void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
                  struct perf_thread_map *threads);
 void perf_evlist__exit(struct evlist *evlist);
-void perf_evlist__delete(struct evlist *evlist);
+void evlist__delete(struct evlist *evlist);
 
 void perf_evlist__add(struct evlist *evlist, struct evsel *entry);
 void perf_evlist__remove(struct evlist *evlist, struct evsel *evsel);
index 5b90786a84369c92d500a40b6ae09a766a4dc62f..29bbfd699226b8cda0b1525e5708dc7abe1c463f 100644 (file)
@@ -3591,7 +3591,7 @@ int perf_session__read_header(struct perf_session *session)
                evsel->needs_swap = header->needs_swap;
                /*
                 * Do it before so that if perf_evsel__alloc_id fails, this
-                * entry gets purged too at perf_evlist__delete().
+                * entry gets purged too at evlist__delete().
                 */
                perf_evlist__add(session->evlist, evsel);
 
@@ -3628,7 +3628,7 @@ out_errno:
        return -errno;
 
 out_delete_evlist:
-       perf_evlist__delete(session->evlist);
+       evlist__delete(session->evlist);
        session->evlist = NULL;
        return -ENOMEM;
 }
index d341b11fb1418418ce66ae50c27322a7db060553..6a4bfc7ab0c11de32a2fd8cc72c835d4761ae937 100644 (file)
@@ -1935,7 +1935,7 @@ int parse_events(struct evlist *evlist, const char *str,
 
        /*
         * There are 2 users - builtin-record and builtin-test objects.
-        * Both call perf_evlist__delete in case of error, so we dont
+        * Both call evlist__delete in case of error, so we dont
         * need to bother.
         */
        return ret;
index a23c69137dfc224d6b4d2158f667a1ef3358e27e..9f8841548539dcb1b4c1103f445528b7d4447e01 100644 (file)
@@ -53,7 +53,7 @@ static int perf_do_probe_api(setup_probe_fn_t fn, int cpu, const char *str)
        err = 0;
 
 out_delete:
-       perf_evlist__delete(evlist);
+       evlist__delete(evlist);
        return err;
 }
 
@@ -299,7 +299,7 @@ bool perf_evlist__can_select_event(struct evlist *evlist, const char *str)
        ret = true;
 
 out_delete:
-       perf_evlist__delete(temp_evlist);
+       evlist__delete(temp_evlist);
        return ret;
 }