Commit e74676de authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf evlist: Rename perf_evlist__disable() to evlist__disable()

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: default avatarJiri 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 1c87f165
......@@ -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];
......
......@@ -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);
......
......@@ -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;
}
}
......
......@@ -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;
......
......@@ -3451,7 +3451,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
goto out_disable;
if (done && !draining) {
perf_evlist__disable(evlist);
evlist__disable(evlist);
draining = true;
}
}
......@@ -3477,7 +3477,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment