mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
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>
This commit is contained in:
parent
1625102764
commit
5972d1e07b
@ -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);
|
||||
|
@ -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) {
|
||||
|
||||
/*
|
||||
|
@ -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)));
|
||||
|
@ -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)));
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user