perf evlist: Rename perf_evlist__enable() to evlist__enable()
authorJiri Olsa <jolsa@kernel.org>
Sun, 21 Jul 2019 11:24:08 +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__enable() to evlist__enable(), so we don't have a
name clash when we add perf_evlist__enable() 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-22-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
16 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-top.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/openat-syscall-tp-fields.c
tools/perf/tests/perf-record.c
tools/perf/tests/sw-clock.c
tools/perf/tests/switch-tracking.c
tools/perf/util/evlist.c
tools/perf/util/evlist.h

index ea4cf1d367a6bfb301f36569021e23991bfad265..aa5a5c972ce5ce526e88e8436ddb399fdbea6007 100644 (file)
@@ -97,7 +97,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
                goto out_err;
        }
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
 
        comm1 = "Test COMM 1";
        CHECK__(prctl(PR_SET_NAME, (unsigned long)comm1, 0, 0, 0));
index 6a0573a9c16b1ab27ac124bda8ad94e3ce33d2bc..9207bd49583e4f333e27c220d9c7485aafd7896a 100644 (file)
@@ -972,7 +972,7 @@ static int kvm_events_live_report(struct perf_kvm_stat *kvm)
                goto out;
 
        /* everything is good - enable the events and process */
-       perf_evlist__enable(kvm->evlist);
+       evlist__enable(kvm->evlist);
 
        while (!done) {
                struct fdarray *fda = &kvm->evlist->pollfd;
index 7f933997b6d079d70d4ab7c78a5c9434d2920774..8e20ead0ddbed0038466f30f7320c45a20302e0d 100644 (file)
@@ -1453,7 +1453,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
         * so don't spoil it by prematurely enabling them.
         */
        if (!target__none(&opts->target) && !opts->initial_delay)
-               perf_evlist__enable(rec->evlist);
+               evlist__enable(rec->evlist);
 
        /*
         * Let the child rip
@@ -1506,7 +1506,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
 
        if (opts->initial_delay) {
                usleep(opts->initial_delay * USEC_PER_MSEC);
-               perf_evlist__enable(rec->evlist);
+               evlist__enable(rec->evlist);
        }
 
        trigger_ready(&auxtrace_snapshot_trigger);
index bdfe138f7aed45f9bcdb6873709b0af8c33e6e6e..c0e9d94b6dd5fb7229d9961d96fc34b8c43af064 100644 (file)
@@ -362,7 +362,7 @@ static void enable_counters(void)
         * - we have initial delay configured
         */
        if (!target__none(&target) || stat_config.initial_delay)
-               perf_evlist__enable(evsel_list);
+               evlist__enable(evsel_list);
 }
 
 static void disable_counters(void)
index 5886389f6a40682605e8bf93d4d880ce19d06312..b103f1ba01cb0789152ff66c6d481ef1976f2d1e 100644 (file)
@@ -1255,7 +1255,7 @@ static int __cmd_top(struct perf_top *top)
         * so leave the check here.
         */
         if (!target__none(&opts->target))
-                perf_evlist__enable(top->evlist);
+               evlist__enable(top->evlist);
 
        ret = -1;
        if (pthread_create(&thread_process, NULL, process_thread, top)) {
index e508fdb770997a3a6f1a91808ad0f4e48558e8c2..46fab1ff92dc69cd9a9102ead49d4b3a7fa2a7c3 100644 (file)
@@ -3402,14 +3402,14 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
                goto out_error_mmap;
 
        if (!target__none(&trace->opts.target) && !trace->opts.initial_delay)
-               perf_evlist__enable(evlist);
+               evlist__enable(evlist);
 
        if (forks)
                perf_evlist__start_workload(evlist);
 
        if (trace->opts.initial_delay) {
                usleep(trace->opts.initial_delay * 1000);
-               perf_evlist__enable(evlist);
+               evlist__enable(evlist);
        }
 
        trace->multiple_threads = thread_map__pid(evlist->threads, 0) == -1 ||
index 8de2d6ad93cebe3c3d3dd039126ee48d0f4f97c7..f4b45702821d4a4f1a128c71623ff608b0430f70 100644 (file)
@@ -68,7 +68,7 @@ static int do_test(struct evlist *evlist, int mmap_pages,
                return TEST_FAIL;
        }
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
        testcase();
        perf_evlist__disable(evlist);
 
index b41c4148228376a546e541287f938e2d9e6fdcd1..92fed94f4b6ce45789c2468dc820853308594688 100644 (file)
@@ -171,7 +171,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
                goto out_delete_evlist;
        }
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
        (*func)();
        perf_evlist__disable(evlist);
 
index 23abc775a69c28c892922c3567f4babed282ad43..8d38e001160de0113caa8cc83f1f643fa3cc0ae1 100644 (file)
@@ -680,7 +680,7 @@ static int do_test_code_reading(bool try_kcore)
                goto out_put;
        }
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
 
        do_something();
 
index c55bc062e2000665102d00417dd1ac3d9b229a69..c333b9c765e8571fb5359b0c018c71e9aee62239 100644 (file)
@@ -107,7 +107,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
         * enabled.
         */
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
 
        comm = "Test COMM 1";
        CHECK__(prctl(PR_SET_NAME, (unsigned long)comm, 0, 0, 0));
@@ -125,7 +125,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
         * disabled with the dummy event still enabled.
         */
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
 
        evsel = perf_evlist__last(evlist);
 
index 233447af9d03fc340da1ff804891cda7b62ed3df..c7182b7840e5011257cf25db55e0421b30ee0710 100644 (file)
@@ -74,7 +74,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
                goto out_delete_evlist;
        }
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
 
        /*
         * Generate the event:
index f5d1e7f1b58b4cbb222e923e877be1fa7740a0eb..67b388e92cba8e419e4ecf3fd879a2ab39be32ba 100644 (file)
@@ -153,7 +153,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
         * Now that all is properly set up, enable the events, they will
         * count just on workload.pid, which will start...
         */
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
 
        /*
         * Now!
index 528a2dff06e086a2dde4f72b076562e2018044bb..4ab316c04ce7a9b40820105f503feaf16406ea08 100644 (file)
@@ -86,7 +86,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
                goto out_delete_evlist;
        }
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
 
        /* collect samples */
        for (i = 0; i < NR_LOOPS; i++)
index 47f9895ba807bf6a28d298fc9f53406244663b6b..ea214313f22bf0d4e4eb55a66cab69da8b8f051e 100644 (file)
@@ -462,7 +462,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
                goto out_err;
        }
 
-       perf_evlist__enable(evlist);
+       evlist__enable(evlist);
 
        err = evsel__disable(cpu_clocks_evsel);
        if (err) {
index 67c288f467f61e838e68be3f8fea861b2b0c2157..94825c37a35ff7b4a3ded2180fe31b04d82ca8f8 100644 (file)
@@ -356,7 +356,7 @@ void perf_evlist__disable(struct evlist *evlist)
        evlist->enabled = false;
 }
 
-void perf_evlist__enable(struct evlist *evlist)
+void evlist__enable(struct evlist *evlist)
 {
        struct evsel *pos;
 
@@ -371,7 +371,7 @@ void perf_evlist__enable(struct evlist *evlist)
 
 void perf_evlist__toggle_enable(struct evlist *evlist)
 {
-       (evlist->enabled ? perf_evlist__disable : perf_evlist__enable)(evlist);
+       (evlist->enabled ? perf_evlist__disable : evlist__enable)(evlist);
 }
 
 static int perf_evlist__enable_event_cpu(struct evlist *evlist,
index 47e9d26b677431840a3a10b8fbff2c5c9970d063..ab48bbfbca41bff4be52e1d9047f5ad23c37e57f 100644 (file)
@@ -185,7 +185,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 perf_evlist__enable(struct evlist *evlist);
+void evlist__enable(struct evlist *evlist);
 void perf_evlist__toggle_enable(struct evlist *evlist);
 
 int perf_evlist__enable_event_idx(struct evlist *evlist,