perf evsel: Rename perf_evsel__open() to evsel__open()
authorJiri Olsa <jolsa@kernel.org>
Sun, 21 Jul 2019 11:24:01 +0000 (13:24 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Jul 2019 21:34:43 +0000 (18:34 -0300)
Rename perf_evsel__open() to evsel__open(), so we don't have a name
clash when we add perf_evsel__open() 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-15-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/tests/mmap-basic.c
tools/perf/tests/openat-syscall-all-cpus.c
tools/perf/util/evlist.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/parse-events.c
tools/perf/util/python.c

index 06966a2c2cdddadc8de8953d07269a9e5b435377..7f933997b6d079d70d4ab7c78a5c9434d2920774 100644 (file)
@@ -739,7 +739,7 @@ static int record__open(struct record *rec)
 
        evlist__for_each_entry(evlist, pos) {
 try_again:
-               if (perf_evsel__open(pos, pos->cpus, pos->threads) < 0) {
+               if (evsel__open(pos, pos->cpus, pos->threads) < 0) {
                        if (perf_evsel__fallback(pos, errno, msg, sizeof(msg))) {
                                if (verbose > 0)
                                        ui__warning("%s\n", msg);
index 6c0c2b78093aa00d0628fd577649a1c9747118f0..5886389f6a40682605e8bf93d4d880ce19d06312 100644 (file)
@@ -989,7 +989,7 @@ static int perf_top__start_counters(struct perf_top *top)
 
        evlist__for_each_entry(evlist, counter) {
 try_again:
-               if (perf_evsel__open(counter, top->evlist->cpus,
+               if (evsel__open(counter, top->evlist->cpus,
                                     top->evlist->threads) < 0) {
 
                        /*
index 16b8a4e5de8f611804c70b50f33dc8392e248ed8..40511025208f97920b4c37f451b782322f84395d 100644 (file)
@@ -84,7 +84,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 
                evlist__add(evlist, evsels[i]);
 
-               if (perf_evsel__open(evsels[i], cpus, threads) < 0) {
+               if (evsel__open(evsels[i], cpus, threads) < 0) {
                        pr_debug("failed to open counter: %s, "
                                 "tweak /proc/sys/kernel/perf_event_paranoid?\n",
                                 str_error_r(errno, sbuf, sizeof(sbuf)));
index 001a0e8e699803c2a6c5a88c9322dfcc8b0c2b64..f96cbd30402454c81666c200b03768ebc338bb85 100644 (file)
@@ -48,7 +48,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int
                goto out_cpu_map_delete;
        }
 
-       if (perf_evsel__open(evsel, cpus, threads) < 0) {
+       if (evsel__open(evsel, cpus, threads) < 0) {
                pr_debug("failed to open counter: %s, "
                         "tweak /proc/sys/kernel/perf_event_paranoid?\n",
                         str_error_r(errno, sbuf, sizeof(sbuf)));
index 47516db624247cac06cd0b52fa191994cbcd8ba3..4627cc47de3e6306194291db522097b06e765e40 100644 (file)
@@ -1405,7 +1405,7 @@ int perf_evlist__open(struct evlist *evlist)
        perf_evlist__update_id_pos(evlist);
 
        evlist__for_each_entry(evlist, evsel) {
-               err = perf_evsel__open(evsel, evsel->cpus, evsel->threads);
+               err = evsel__open(evsel, evsel->cpus, evsel->threads);
                if (err < 0)
                        goto out_err;
        }
@@ -1918,7 +1918,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist,
                goto out_delete_evlist;
 
        evlist__for_each_entry(evlist, counter) {
-               if (perf_evsel__open(counter, evlist->cpus,
+               if (evsel__open(counter, evlist->cpus,
                                     evlist->threads) < 0)
                        goto out_delete_evlist;
        }
index c9723c2d57c91cc521254a877a441251dade6242..f365d0685268c6b31e59750663a33b8c1aacdeb0 100644 (file)
@@ -1825,8 +1825,8 @@ static int perf_event_open(struct evsel *evsel,
        return fd;
 }
 
-int perf_evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
-                    struct perf_thread_map *threads)
+int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
+               struct perf_thread_map *threads)
 {
        int cpu, thread, nthreads;
        unsigned long flags = PERF_FLAG_FD_CLOEXEC;
@@ -2086,13 +2086,13 @@ void perf_evsel__close(struct evsel *evsel)
 int perf_evsel__open_per_cpu(struct evsel *evsel,
                             struct perf_cpu_map *cpus)
 {
-       return perf_evsel__open(evsel, cpus, NULL);
+       return evsel__open(evsel, cpus, NULL);
 }
 
 int perf_evsel__open_per_thread(struct evsel *evsel,
                                struct perf_thread_map *threads)
 {
-       return perf_evsel__open(evsel, NULL, threads);
+       return evsel__open(evsel, NULL, threads);
 }
 
 static int perf_evsel__parse_id_sample(const struct evsel *evsel,
index ecea51a918e0ad07be294bdf8657cfe3460da5b2..d43409bb07c56e9a5ddfc8a583957aa346747f07 100644 (file)
@@ -302,8 +302,8 @@ int perf_evsel__open_per_cpu(struct evsel *evsel,
                             struct perf_cpu_map *cpus);
 int perf_evsel__open_per_thread(struct evsel *evsel,
                                struct perf_thread_map *threads);
-int perf_evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
-                    struct perf_thread_map *threads);
+int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
+               struct perf_thread_map *threads);
 void perf_evsel__close(struct evsel *evsel);
 
 struct perf_sample;
index 40087cf74dd1bb46ce6f7bfe81e422fde0aa4ebd..decb66d243ca714acb652dd907898a87aa9be89d 100644 (file)
@@ -2320,7 +2320,7 @@ static bool is_event_supported(u8 type, unsigned config)
 
        evsel = evsel__new(&attr);
        if (evsel) {
-               open_return = perf_evsel__open(evsel, NULL, tmap);
+               open_return = evsel__open(evsel, NULL, tmap);
                ret = open_return >= 0;
 
                if (open_return == -EACCES) {
@@ -2332,7 +2332,7 @@ static bool is_event_supported(u8 type, unsigned config)
                         *
                         */
                        evsel->attr.exclude_kernel = 1;
-                       ret = perf_evsel__open(evsel, NULL, tmap) >= 0;
+                       ret = evsel__open(evsel, NULL, tmap) >= 0;
                }
                evsel__delete(evsel);
        }
index 48c951a4a76bde11e381d35987017640d4d830d6..3eb7348d29f89dfc198832fca38b51a639aaa57d 100644 (file)
@@ -817,7 +817,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
         * This will group just the fds for this single evsel, to group
         * multiple events, use evlist.open().
         */
-       if (perf_evsel__open(evsel, cpus, threads) < 0) {
+       if (evsel__open(evsel, cpus, threads) < 0) {
                PyErr_SetFromErrno(PyExc_OSError);
                return NULL;
        }