Commit 474ddc4c authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf evlist: Rename perf_evlist__open() to evlist__open()

Rename perf_evlist__open() to evlist__open(), so we don't have a name
clash when we add perf_evlist__open() in libperf.
Signed-off-by: default avatarJiri 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-20-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent b49aca3e
......@@ -83,7 +83,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
evsel->attr.disabled = 1;
evsel->attr.enable_on_exec = 0;
CHECK__(perf_evlist__open(evlist));
CHECK__(evlist__open(evlist));
CHECK__(perf_evlist__mmap(evlist, UINT_MAX));
......
......@@ -1048,7 +1048,7 @@ static int kvm_live_open_events(struct perf_kvm_stat *kvm)
attr->disabled = 1;
}
err = perf_evlist__open(evlist);
err = evlist__open(evlist);
if (err < 0) {
printf("Couldn't create the events: %s\n",
str_error_r(errno, sbuf, sizeof(sbuf)));
......
......@@ -3342,7 +3342,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
}
}
err = perf_evlist__open(evlist);
err = evlist__open(evlist);
if (err < 0)
goto out_error_open;
......
......@@ -125,7 +125,7 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
perf_evlist__config(evlist, &opts, NULL);
err = perf_evlist__open(evlist);
err = evlist__open(evlist);
if (err < 0) {
pr_debug("perf_evlist__open: %s\n",
str_error_r(errno, sbuf, sizeof(sbuf)));
......
......@@ -157,7 +157,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
perf_evlist__config(evlist, &opts, NULL);
err = perf_evlist__open(evlist);
err = evlist__open(evlist);
if (err < 0) {
pr_debug("perf_evlist__open: %s\n",
str_error_r(errno, sbuf, sizeof(sbuf)));
......
......@@ -646,7 +646,7 @@ static int do_test_code_reading(bool try_kcore)
evsel->attr.disabled = 1;
evsel->attr.enable_on_exec = 0;
ret = perf_evlist__open(evlist);
ret = evlist__open(evlist);
if (ret < 0) {
if (!excl_kernel) {
excl_kernel = true;
......
......@@ -38,7 +38,7 @@ static int attach__enable_on_exec(struct evlist *evlist)
evsel->attr.enable_on_exec = 1;
err = perf_evlist__open(evlist);
err = evlist__open(evlist);
if (err < 0) {
pr_debug("perf_evlist__open: %s\n",
str_error_r(errno, sbuf, sizeof(sbuf)));
......
......@@ -94,7 +94,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
evsel->attr.disabled = 1;
evsel->attr.enable_on_exec = 0;
if (perf_evlist__open(evlist) < 0) {
if (evlist__open(evlist) < 0) {
pr_debug("Unable to open dummy and cycles event\n");
err = TEST_SKIP;
goto out_err;
......
......@@ -60,7 +60,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
thread_map__set_pid(evlist->threads, 0, getpid());
err = perf_evlist__open(evlist);
err = evlist__open(evlist);
if (err < 0) {
pr_debug("perf_evlist__open: %s\n",
str_error_r(errno, sbuf, sizeof(sbuf)));
......
......@@ -130,7 +130,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
* Call sys_perf_event_open on all the fds on all the evsels,
* grouping them if asked to.
*/
err = perf_evlist__open(evlist);
err = evlist__open(evlist);
if (err < 0) {
pr_debug("perf_evlist__open: %s\n",
str_error_r(errno, sbuf, sizeof(sbuf)));
......
......@@ -69,7 +69,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
cpus = NULL;
threads = NULL;
if (perf_evlist__open(evlist)) {
if (evlist__open(evlist)) {
const char *knob = "/proc/sys/kernel/perf_event_max_sample_rate";
err = -errno;
......
......@@ -450,7 +450,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
}
}
if (perf_evlist__open(evlist) < 0) {
if (evlist__open(evlist) < 0) {
pr_debug("Not supported\n");
err = 0;
goto out;
......
......@@ -95,7 +95,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
evsel->attr.wakeup_events = 1;
evsel->attr.exclude_kernel = 1;
err = perf_evlist__open(evlist);
err = evlist__open(evlist);
if (err < 0) {
pr_debug("Couldn't open the evlist: %s\n",
str_error_r(-err, sbuf, sizeof(sbuf)));
......
......@@ -1387,7 +1387,7 @@ static int perf_evlist__create_syswide_maps(struct evlist *evlist)
goto out;
}
int perf_evlist__open(struct evlist *evlist)
int evlist__open(struct evlist *evlist)
{
struct evsel *evsel;
int err;
......
......@@ -146,7 +146,7 @@ void perf_evlist__toggle_bkw_mmap(struct evlist *evlist, enum bkw_mmap_state sta
void perf_evlist__mmap_consume(struct evlist *evlist, int idx);
int perf_evlist__open(struct evlist *evlist);
int evlist__open(struct evlist *evlist);
void perf_evlist__close(struct evlist *evlist);
struct callchain_param;
......
......@@ -1059,7 +1059,7 @@ static PyObject *pyrf_evlist__open(struct pyrf_evlist *pevlist,
if (group)
perf_evlist__set_leader(evlist);
if (perf_evlist__open(evlist) < 0) {
if (evlist__open(evlist) < 0) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment