perf evlist: Rename perf_evlist__enable() to evlist__enable()

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>
This commit is contained in:
Jiri Olsa 2019-07-21 13:24:08 +02:00 committed by Arnaldo Carvalho de Melo
parent 750b4edeb0
commit 1c87f1654c
16 changed files with 20 additions and 20 deletions

View 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));

View 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;

View 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);

View 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)

View 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)) {

View 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 ||

View 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);

View 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);

View 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();

View 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);

View 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:

View 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!

View 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++)

View 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) {

View 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,

View 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,