diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-21 14:24:01 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-30 00:34:43 +0300 |
commit | 5972d1e07bd95c7458e2d7f484391d69008affc7 (patch) | |
tree | 97180deaa94ccc312273b3bc31c0e04c64874f43 /tools/perf/util | |
parent | 1625102764a578b11fb407b8194cb0521129d919 (diff) | |
download | linux-5972d1e07bd95c7458e2d7f484391d69008affc7.tar.xz |
perf evsel: Rename perf_evsel__open() to evsel__open()
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>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/evlist.c | 4 | ||||
-rw-r--r-- | tools/perf/util/evsel.c | 8 | ||||
-rw-r--r-- | tools/perf/util/evsel.h | 4 | ||||
-rw-r--r-- | tools/perf/util/parse-events.c | 4 | ||||
-rw-r--r-- | tools/perf/util/python.c | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 47516db62424..4627cc47de3e 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -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; } diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index c9723c2d57c9..f365d0685268 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -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, diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index ecea51a918e0..d43409bb07c5 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -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; diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 40087cf74dd1..decb66d243ca 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -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); } diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 48c951a4a76b..3eb7348d29f8 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -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; } |