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)
evlist__for_each_entry(ptr->evlist, evsel) {
if (evsel->attr.type == ptr->cs_etm_pmu->type)
return perf_evsel__enable(evsel);
return evsel__enable(evsel);
}
return -EINVAL;
}
......
......@@ -330,7 +330,7 @@ static int intel_bts_snapshot_finish(struct auxtrace_record *itr)
evlist__for_each_entry(btsr->evlist, evsel) {
if (evsel->attr.type == btsr->intel_bts_pmu->type)
return perf_evsel__enable(evsel);
return evsel__enable(evsel);
}
return -EINVAL;
}
......
......@@ -801,7 +801,7 @@ static int intel_pt_snapshot_finish(struct auxtrace_record *itr)
evlist__for_each_entry(ptr->evlist, evsel) {
if (evsel->attr.type == ptr->intel_pt_pmu->type)
return perf_evsel__enable(evsel);
return evsel__enable(evsel);
}
return -EINVAL;
}
......
......@@ -77,7 +77,7 @@ static int attach__current_disabled(struct evlist *evlist)
}
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)
......@@ -104,7 +104,7 @@ static int detach__disable(struct evlist *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)
......@@ -133,7 +133,7 @@ static int attach__cpu_disabled(struct evlist *evlist)
}
cpu_map__put(cpus);
return perf_evsel__enable(evsel);
return evsel__enable(evsel);
}
static int attach__cpu_enabled(struct evlist *evlist)
......
......@@ -509,7 +509,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
goto out_err;
}
err = perf_evsel__enable(cycles_evsel);
err = evsel__enable(cycles_evsel);
if (err) {
pr_debug("perf_evlist__disable_event failed!\n");
goto out_err;
......
......@@ -363,7 +363,7 @@ void perf_evlist__enable(struct evlist *evlist)
evlist__for_each_entry(evlist, pos) {
if (!perf_evsel__is_group_leader(pos) || !pos->fd)
continue;
perf_evsel__enable(pos);
evsel__enable(pos);
}
evlist->enabled = true;
......@@ -1927,7 +1927,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist,
goto out_delete_evlist;
evlist__for_each_entry(evlist, counter) {
if (perf_evsel__enable(counter))
if (evsel__enable(counter))
goto out_delete_evlist;
}
......
......@@ -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);
}
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);
......
......@@ -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,
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__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