perf evlist: Rename perf_evlist__disable() to evlist__disable()
authorJiri Olsa <jolsa@kernel.org>
Sun, 21 Jul 2019 11:24:09 +0000 (13:24 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Jul 2019 21:34:43 +0000 (18:34 -0300)
Rename perf_evlist__disable() to evlist__disable(), so we don't have a
name clash when we add perf_evlist__disable() 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-23-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 files changed:
tools/perf/arch/x86/tests/perf-time-to-tsc.c
tools/perf/builtin-kvm.c
tools/perf/builtin-record.c
tools/perf/builtin-stat.c
tools/perf/builtin-trace.c
tools/perf/tests/backward-ring-buffer.c
tools/perf/tests/bpf.c
tools/perf/tests/code-reading.c
tools/perf/tests/keep-tracking.c
tools/perf/tests/sw-clock.c
tools/perf/tests/switch-tracking.c
tools/perf/util/evlist.c
tools/perf/util/evlist.h

index aa5a5c972ce5ce526e88e8436ddb399fdbea6007..8b70e9ee341a10ffae23d18f7ba87d08739aee39 100644 (file)
@@ -107,7 +107,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
        comm2 = "Test COMM 2";
        CHECK__(prctl(PR_SET_NAME, (unsigned long)comm2, 0, 0, 0));
 
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        for (i = 0; i < evlist->nr_mmaps; i++) {
                md = &evlist->mmap[i];
index 9207bd49583e4f333e27c220d9c7485aafd7896a..3370eba0d3f35ba068595128c88c1488cb2d5d3c 100644 (file)
@@ -993,7 +993,7 @@ static int kvm_events_live_report(struct perf_kvm_stat *kvm)
                        err = fdarray__poll(fda, 100);
        }
 
-       perf_evlist__disable(kvm->evlist);
+       evlist__disable(kvm->evlist);
 
        if (err == 0) {
                sort_result(kvm);
index 8e20ead0ddbed0038466f30f7320c45a20302e0d..c0962ddfad049893b56c34eaa4c10f9b852a5c92 100644 (file)
@@ -1605,7 +1605,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
                 */
                if (done && !disabled && !target__none(&opts->target)) {
                        trigger_off(&auxtrace_snapshot_trigger);
-                       perf_evlist__disable(rec->evlist);
+                       evlist__disable(rec->evlist);
                        disabled = true;
                }
        }
index c0e9d94b6dd5fb7229d9961d96fc34b8c43af064..36e66a4f3c5736d5afbb1745ee69fb944fb04d80 100644 (file)
@@ -373,7 +373,7 @@ static void disable_counters(void)
         * from counting before reading their constituent counters.
         */
        if (!target__none(&target))
-               perf_evlist__disable(evsel_list);
+               evlist__disable(evsel_list);
 }
 
 static volatile int workload_exec_errno;
index 46fab1ff92dc69cd9a9102ead49d4b3a7fa2a7c3..51d142594a123429481f043a520a38fbf45a33d8 100644 (file)
@@ -3451,7 +3451,7 @@ again:
                                goto out_disable;
 
                        if (done && !draining) {
-                               perf_evlist__disable(evlist);
+                               evlist__disable(evlist);
                                draining = true;
                        }
                }
@@ -3477,7 +3477,7 @@ again:
 out_disable:
        thread__zput(trace->current);
 
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        if (trace->sort_events)
                ordered_events__flush(&trace->oe.data, OE_FLUSH__FINAL);
index f4b45702821d4a4f1a128c71623ff608b0430f70..9bdf66139099ac5a96dc120225abdb4bc751af51 100644 (file)
@@ -70,7 +70,7 @@ static int do_test(struct evlist *evlist, int mmap_pages,
 
        evlist__enable(evlist);
        testcase();
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        err = count_samples(evlist, sample_count, comm_count);
        perf_evlist__munmap(evlist);
index 92fed94f4b6ce45789c2468dc820853308594688..e16f927f38b6b9129dd72fc5bbfee7c7bcc877fc 100644 (file)
@@ -173,7 +173,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
 
        evlist__enable(evlist);
        (*func)();
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        for (i = 0; i < evlist->nr_mmaps; i++) {
                union perf_event *event;
index 8d38e001160de0113caa8cc83f1f643fa3cc0ae1..ec4b0bf28270d11bcfa407a8d50f3982b07fb1f7 100644 (file)
@@ -684,7 +684,7 @@ static int do_test_code_reading(bool try_kcore)
 
        do_something();
 
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        ret = process_events(machine, evlist, &state);
        if (ret < 0)
index c333b9c765e8571fb5359b0c018c71e9aee62239..7bfc859971e58df6e3b2d4e2403b1d3ad122c38e 100644 (file)
@@ -112,7 +112,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
        comm = "Test COMM 1";
        CHECK__(prctl(PR_SET_NAME, (unsigned long)comm, 0, 0, 0));
 
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        found = find_comm(evlist, comm);
        if (found != 1) {
@@ -134,7 +134,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
        comm = "Test COMM 2";
        CHECK__(prctl(PR_SET_NAME, (unsigned long)comm, 0, 0, 0));
 
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        found = find_comm(evlist, comm);
        if (found != 1) {
@@ -146,7 +146,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 
 out_err:
        if (evlist) {
-               perf_evlist__disable(evlist);
+               evlist__disable(evlist);
                evlist__delete(evlist);
        } else {
                cpu_map__put(cpus);
index 4ab316c04ce7a9b40820105f503feaf16406ea08..ba033a6e6c0fad80f7abadc14b83b4cb210552ba 100644 (file)
@@ -92,7 +92,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
        for (i = 0; i < NR_LOOPS; i++)
                tmp++;
 
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        md = &evlist->mmap[0];
        if (perf_mmap__read_init(md) < 0)
index ea214313f22bf0d4e4eb55a66cab69da8b8f051e..d5537edb47db19811bc07f23785c42de97d402ae 100644 (file)
@@ -528,7 +528,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
                goto out_err;
        }
 
-       perf_evlist__disable(evlist);
+       evlist__disable(evlist);
 
        switch_tracking.switch_evsel = switch_evsel;
        switch_tracking.cycles_evsel = cycles_evsel;
@@ -566,7 +566,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
        }
 out:
        if (evlist) {
-               perf_evlist__disable(evlist);
+               evlist__disable(evlist);
                evlist__delete(evlist);
        } else {
                cpu_map__put(cpus);
index 94825c37a35ff7b4a3ded2180fe31b04d82ca8f8..1bedec28e58f753a1ee30e13d2e520f7f0522892 100644 (file)
@@ -343,7 +343,7 @@ static int perf_evlist__nr_threads(struct evlist *evlist,
                return thread_map__nr(evlist->threads);
 }
 
-void perf_evlist__disable(struct evlist *evlist)
+void evlist__disable(struct evlist *evlist)
 {
        struct evsel *pos;
 
@@ -371,7 +371,7 @@ void evlist__enable(struct evlist *evlist)
 
 void perf_evlist__toggle_enable(struct evlist *evlist)
 {
-       (evlist->enabled ? perf_evlist__disable : evlist__enable)(evlist);
+       (evlist->enabled ? evlist__disable : evlist__enable)(evlist);
 }
 
 static int perf_evlist__enable_event_cpu(struct evlist *evlist,
index ab48bbfbca41bff4be52e1d9047f5ad23c37e57f..99621c056d095ea0b6d50ba0ca7ee3e0b8ef273d 100644 (file)
@@ -184,7 +184,7 @@ void perf_evlist__munmap(struct evlist *evlist);
 
 size_t perf_evlist__mmap_size(unsigned long pages);
 
-void perf_evlist__disable(struct evlist *evlist);
+void evlist__disable(struct evlist *evlist);
 void evlist__enable(struct evlist *evlist);
 void perf_evlist__toggle_enable(struct evlist *evlist);