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

perf evsel: Rename perf_evsel__disable() to evsel__disable()

Renaming perf_evsel__disable() to evsel__disable(), so we don't have a
name clash when we add perf_evsel__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-17-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ec7f24ef
...@@ -821,7 +821,7 @@ static int cs_etm_snapshot_start(struct auxtrace_record *itr) ...@@ -821,7 +821,7 @@ static int cs_etm_snapshot_start(struct auxtrace_record *itr)
evlist__for_each_entry(ptr->evlist, evsel) { evlist__for_each_entry(ptr->evlist, evsel) {
if (evsel->attr.type == ptr->cs_etm_pmu->type) if (evsel->attr.type == ptr->cs_etm_pmu->type)
return perf_evsel__disable(evsel); return evsel__disable(evsel);
} }
return -EINVAL; return -EINVAL;
} }
......
...@@ -317,7 +317,7 @@ static int intel_bts_snapshot_start(struct auxtrace_record *itr) ...@@ -317,7 +317,7 @@ static int intel_bts_snapshot_start(struct auxtrace_record *itr)
evlist__for_each_entry(btsr->evlist, evsel) { evlist__for_each_entry(btsr->evlist, evsel) {
if (evsel->attr.type == btsr->intel_bts_pmu->type) if (evsel->attr.type == btsr->intel_bts_pmu->type)
return perf_evsel__disable(evsel); return evsel__disable(evsel);
} }
return -EINVAL; return -EINVAL;
} }
......
...@@ -788,7 +788,7 @@ static int intel_pt_snapshot_start(struct auxtrace_record *itr) ...@@ -788,7 +788,7 @@ static int intel_pt_snapshot_start(struct auxtrace_record *itr)
evlist__for_each_entry(ptr->evlist, evsel) { evlist__for_each_entry(ptr->evlist, evsel) {
if (evsel->attr.type == ptr->intel_pt_pmu->type) if (evsel->attr.type == ptr->intel_pt_pmu->type)
return perf_evsel__disable(evsel); return evsel__disable(evsel);
} }
return -EINVAL; return -EINVAL;
} }
......
...@@ -2400,7 +2400,7 @@ static int trace__event_handler(struct trace *trace, struct evsel *evsel, ...@@ -2400,7 +2400,7 @@ static int trace__event_handler(struct trace *trace, struct evsel *evsel,
++trace->nr_events_printed; ++trace->nr_events_printed;
if (evsel->max_events != ULONG_MAX && ++evsel->nr_events_printed == evsel->max_events) { if (evsel->max_events != ULONG_MAX && ++evsel->nr_events_printed == evsel->max_events) {
perf_evsel__disable(evsel); evsel__disable(evsel);
perf_evsel__close(evsel); perf_evsel__close(evsel);
} }
} }
......
...@@ -129,7 +129,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un ...@@ -129,7 +129,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
evsel = perf_evlist__last(evlist); evsel = perf_evlist__last(evlist);
CHECK__(perf_evsel__disable(evsel)); CHECK__(evsel__disable(evsel));
comm = "Test COMM 2"; comm = "Test COMM 2";
CHECK__(prctl(PR_SET_NAME, (unsigned long)comm, 0, 0, 0)); CHECK__(prctl(PR_SET_NAME, (unsigned long)comm, 0, 0, 0));
......
...@@ -464,7 +464,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_ ...@@ -464,7 +464,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
perf_evlist__enable(evlist); perf_evlist__enable(evlist);
err = perf_evsel__disable(cpu_clocks_evsel); err = evsel__disable(cpu_clocks_evsel);
if (err) { if (err) {
pr_debug("perf_evlist__disable_event failed!\n"); pr_debug("perf_evlist__disable_event failed!\n");
goto out_err; goto out_err;
...@@ -483,7 +483,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_ ...@@ -483,7 +483,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
goto out_err; goto out_err;
} }
err = perf_evsel__disable(cycles_evsel); err = evsel__disable(cycles_evsel);
if (err) { if (err) {
pr_debug("perf_evlist__disable_event failed!\n"); pr_debug("perf_evlist__disable_event failed!\n");
goto out_err; goto out_err;
......
...@@ -350,7 +350,7 @@ void perf_evlist__disable(struct evlist *evlist) ...@@ -350,7 +350,7 @@ void perf_evlist__disable(struct evlist *evlist)
evlist__for_each_entry(evlist, pos) { evlist__for_each_entry(evlist, pos) {
if (pos->disabled || !perf_evsel__is_group_leader(pos) || !pos->fd) if (pos->disabled || !perf_evsel__is_group_leader(pos) || !pos->fd)
continue; continue;
perf_evsel__disable(pos); evsel__disable(pos);
} }
evlist->enabled = false; evlist->enabled = false;
......
...@@ -1244,7 +1244,7 @@ int evsel__enable(struct evsel *evsel) ...@@ -1244,7 +1244,7 @@ int evsel__enable(struct evsel *evsel)
return err; return err;
} }
int perf_evsel__disable(struct evsel *evsel) int evsel__disable(struct evsel *evsel)
{ {
int err = perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_DISABLE, 0); int err = perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_DISABLE, 0);
/* /*
......
...@@ -296,7 +296,7 @@ int perf_evsel__append_addr_filter(struct evsel *evsel, ...@@ -296,7 +296,7 @@ int perf_evsel__append_addr_filter(struct evsel *evsel,
const char *filter); const char *filter);
int perf_evsel__apply_filter(struct evsel *evsel, const char *filter); int perf_evsel__apply_filter(struct evsel *evsel, const char *filter);
int evsel__enable(struct evsel *evsel); int evsel__enable(struct evsel *evsel);
int perf_evsel__disable(struct evsel *evsel); int evsel__disable(struct evsel *evsel);
int perf_evsel__open_per_cpu(struct evsel *evsel, int perf_evsel__open_per_cpu(struct evsel *evsel,
struct perf_cpu_map *cpus); struct perf_cpu_map *cpus);
......
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