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

perf evsel: Rename perf_evsel__enable() to evsel__enable()

Rename perf_evsel__enable() to evsel__enable(), so we don't have a name
clash when we add perf_evsel__enable() 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-16-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5972d1e0
...@@ -834,7 +834,7 @@ static int cs_etm_snapshot_finish(struct auxtrace_record *itr) ...@@ -834,7 +834,7 @@ static int cs_etm_snapshot_finish(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__enable(evsel); return evsel__enable(evsel);
} }
return -EINVAL; return -EINVAL;
} }
......
...@@ -330,7 +330,7 @@ static int intel_bts_snapshot_finish(struct auxtrace_record *itr) ...@@ -330,7 +330,7 @@ static int intel_bts_snapshot_finish(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__enable(evsel); return evsel__enable(evsel);
} }
return -EINVAL; return -EINVAL;
} }
......
...@@ -801,7 +801,7 @@ static int intel_pt_snapshot_finish(struct auxtrace_record *itr) ...@@ -801,7 +801,7 @@ static int intel_pt_snapshot_finish(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__enable(evsel); return evsel__enable(evsel);
} }
return -EINVAL; return -EINVAL;
} }
......
...@@ -77,7 +77,7 @@ static int attach__current_disabled(struct evlist *evlist) ...@@ -77,7 +77,7 @@ static int attach__current_disabled(struct evlist *evlist)
} }
thread_map__put(threads); thread_map__put(threads);
return perf_evsel__enable(evsel) == 0 ? TEST_OK : TEST_FAIL; return evsel__enable(evsel) == 0 ? TEST_OK : TEST_FAIL;
} }
static int attach__current_enabled(struct evlist *evlist) static int attach__current_enabled(struct evlist *evlist)
...@@ -104,7 +104,7 @@ static int detach__disable(struct evlist *evlist) ...@@ -104,7 +104,7 @@ static int detach__disable(struct evlist *evlist)
{ {
struct evsel *evsel = perf_evlist__last(evlist); struct evsel *evsel = perf_evlist__last(evlist);
return perf_evsel__enable(evsel); return evsel__enable(evsel);
} }
static int attach__cpu_disabled(struct evlist *evlist) static int attach__cpu_disabled(struct evlist *evlist)
...@@ -133,7 +133,7 @@ static int attach__cpu_disabled(struct evlist *evlist) ...@@ -133,7 +133,7 @@ static int attach__cpu_disabled(struct evlist *evlist)
} }
cpu_map__put(cpus); cpu_map__put(cpus);
return perf_evsel__enable(evsel); return evsel__enable(evsel);
} }
static int attach__cpu_enabled(struct evlist *evlist) static int attach__cpu_enabled(struct evlist *evlist)
......
...@@ -509,7 +509,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_ ...@@ -509,7 +509,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
goto out_err; goto out_err;
} }
err = perf_evsel__enable(cycles_evsel); err = evsel__enable(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;
......
...@@ -363,7 +363,7 @@ void perf_evlist__enable(struct evlist *evlist) ...@@ -363,7 +363,7 @@ void perf_evlist__enable(struct evlist *evlist)
evlist__for_each_entry(evlist, pos) { evlist__for_each_entry(evlist, pos) {
if (!perf_evsel__is_group_leader(pos) || !pos->fd) if (!perf_evsel__is_group_leader(pos) || !pos->fd)
continue; continue;
perf_evsel__enable(pos); evsel__enable(pos);
} }
evlist->enabled = true; evlist->enabled = true;
...@@ -1927,7 +1927,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist, ...@@ -1927,7 +1927,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist,
goto out_delete_evlist; goto out_delete_evlist;
evlist__for_each_entry(evlist, counter) { evlist__for_each_entry(evlist, counter) {
if (perf_evsel__enable(counter)) if (evsel__enable(counter))
goto out_delete_evlist; goto out_delete_evlist;
} }
......
...@@ -1234,7 +1234,7 @@ int perf_evsel__append_addr_filter(struct evsel *evsel, const char *filter) ...@@ -1234,7 +1234,7 @@ int perf_evsel__append_addr_filter(struct evsel *evsel, const char *filter)
return perf_evsel__append_filter(evsel, "%s,%s", filter); return perf_evsel__append_filter(evsel, "%s,%s", filter);
} }
int perf_evsel__enable(struct evsel *evsel) int evsel__enable(struct evsel *evsel)
{ {
int err = perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_ENABLE, 0); int err = perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_ENABLE, 0);
......
...@@ -295,7 +295,7 @@ int perf_evsel__append_tp_filter(struct evsel *evsel, const char *filter); ...@@ -295,7 +295,7 @@ int perf_evsel__append_tp_filter(struct evsel *evsel, const char *filter);
int perf_evsel__append_addr_filter(struct evsel *evsel, 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 perf_evsel__enable(struct evsel *evsel); int evsel__enable(struct evsel *evsel);
int perf_evsel__disable(struct evsel *evsel); int perf_evsel__disable(struct evsel *evsel);
int perf_evsel__open_per_cpu(struct evsel *evsel, int perf_evsel__open_per_cpu(struct evsel *evsel,
......
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