mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
perf evsel: Rename perf_evsel__open_per_*() to evsel__open_per_*()
As those are not 'struct evsel' methods, not part of tools/lib/perf/, aka libperf, to whom the perf_ prefix belongs. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ad681adf1d
commit
aa8c406b0a
@ -72,7 +72,7 @@ static int attach__current_disabled(struct evlist *evlist)
|
||||
|
||||
evsel->core.attr.disabled = 1;
|
||||
|
||||
err = perf_evsel__open_per_thread(evsel, threads);
|
||||
err = evsel__open_per_thread(evsel, threads);
|
||||
if (err) {
|
||||
pr_debug("Failed to open event cpu-clock:u\n");
|
||||
return err;
|
||||
@ -96,7 +96,7 @@ static int attach__current_enabled(struct evlist *evlist)
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = perf_evsel__open_per_thread(evsel, threads);
|
||||
err = evsel__open_per_thread(evsel, threads);
|
||||
|
||||
perf_thread_map__put(threads);
|
||||
return err == 0 ? TEST_OK : TEST_FAIL;
|
||||
@ -125,7 +125,7 @@ static int attach__cpu_disabled(struct evlist *evlist)
|
||||
|
||||
evsel->core.attr.disabled = 1;
|
||||
|
||||
err = perf_evsel__open_per_cpu(evsel, cpus, -1);
|
||||
err = evsel__open_per_cpu(evsel, cpus, -1);
|
||||
if (err) {
|
||||
if (err == -EACCES)
|
||||
return TEST_SKIP;
|
||||
@ -152,7 +152,7 @@ static int attach__cpu_enabled(struct evlist *evlist)
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = perf_evsel__open_per_cpu(evsel, cpus, -1);
|
||||
err = evsel__open_per_cpu(evsel, cpus, -1);
|
||||
if (err == -EACCES)
|
||||
return TEST_SKIP;
|
||||
|
||||
|
@ -34,7 +34,7 @@ int test__openat_syscall_event(struct test *test __maybe_unused, int subtest __m
|
||||
goto out_thread_map_delete;
|
||||
}
|
||||
|
||||
if (perf_evsel__open_per_thread(evsel, threads) < 0) {
|
||||
if (evsel__open_per_thread(evsel, threads) < 0) {
|
||||
pr_debug("failed to open counter: %s, "
|
||||
"tweak /proc/sys/kernel/perf_event_paranoid?\n",
|
||||
str_error_r(errno, sbuf, sizeof(sbuf)));
|
||||
|
@ -1863,9 +1863,7 @@ void evsel__close(struct evsel *evsel)
|
||||
perf_evsel__free_id(&evsel->core);
|
||||
}
|
||||
|
||||
int perf_evsel__open_per_cpu(struct evsel *evsel,
|
||||
struct perf_cpu_map *cpus,
|
||||
int cpu)
|
||||
int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu)
|
||||
{
|
||||
if (cpu == -1)
|
||||
return evsel__open_cpu(evsel, cpus, NULL, 0,
|
||||
@ -1874,8 +1872,7 @@ int perf_evsel__open_per_cpu(struct evsel *evsel,
|
||||
return evsel__open_cpu(evsel, cpus, NULL, cpu, cpu + 1);
|
||||
}
|
||||
|
||||
int perf_evsel__open_per_thread(struct evsel *evsel,
|
||||
struct perf_thread_map *threads)
|
||||
int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads)
|
||||
{
|
||||
return evsel__open(evsel, NULL, threads);
|
||||
}
|
||||
|
@ -233,11 +233,8 @@ int evsel__enable(struct evsel *evsel);
|
||||
int evsel__disable(struct evsel *evsel);
|
||||
int evsel__disable_cpu(struct evsel *evsel, int cpu);
|
||||
|
||||
int perf_evsel__open_per_cpu(struct evsel *evsel,
|
||||
struct perf_cpu_map *cpus,
|
||||
int cpu);
|
||||
int perf_evsel__open_per_thread(struct evsel *evsel,
|
||||
struct perf_thread_map *threads);
|
||||
int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu);
|
||||
int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads);
|
||||
int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
|
||||
struct perf_thread_map *threads);
|
||||
void evsel__close(struct evsel *evsel);
|
||||
|
@ -521,7 +521,7 @@ int create_perf_stat_counter(struct evsel *evsel,
|
||||
}
|
||||
|
||||
if (target__has_cpu(target) && !target__has_per_thread(target))
|
||||
return perf_evsel__open_per_cpu(evsel, evsel__cpus(evsel), cpu);
|
||||
return evsel__open_per_cpu(evsel, evsel__cpus(evsel), cpu);
|
||||
|
||||
return perf_evsel__open_per_thread(evsel, evsel->core.threads);
|
||||
return evsel__open_per_thread(evsel, evsel->core.threads);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user