]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
perf evsel: Rename perf_evsel__open_per_*() to evsel__open_per_*()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 29 Apr 2020 19:21:03 +0000 (16:21 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 May 2020 19:35:30 +0000 (16:35 -0300)
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>
tools/perf/tests/event-times.c
tools/perf/tests/openat-syscall.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/stat.c

index 1e8a9f5c356dd623226c5fb7dee5e4f30b002b6f..db68894a6f40a9fd72e57cce00fee6f58fbd1294 100644 (file)
@@ -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;
 
index 5ebffae186051f8213a408890d9787ebfb9c39a0..8497a1fe9bac9dc0397edacd647c6694ba356c37 100644 (file)
@@ -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)));
index 4f271764cbf2f5c40fb0f18570c7de629c8f80f0..bbd57e8fde7d317ec7d5b12299db7d0e7a4f7195 100644 (file)
@@ -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);
 }
index df64d89cd9169a7869ee08be7e37b4f02e82530f..e16a9b23556b4cad9f7584fc91de834acd6eaae2 100644 (file)
@@ -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);
index c27f01b944c50b1bcde4f673caf022555a840ac5..3520b744361552b6cd7761b22cdd5d03c6977a08 100644 (file)
@@ -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);
 }