perf evlist: Use the right prefix for 'struct evlist' enable event methods

perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/,
go on completing this split.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2020-11-30 14:47:05 -03:00
Родитель 0a7e7ec90e
Коммит 37b01abe2a
3 изменённых файлов: 8 добавлений и 14 удалений

Просмотреть файл

@ -658,8 +658,7 @@ int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx)
if (evsel->core.attr.type == itr->pmu->type) {
if (evsel->disabled)
return 0;
return perf_evlist__enable_event_idx(itr->evlist, evsel,
idx);
return evlist__enable_event_idx(itr->evlist, evsel, idx);
}
}
return -EINVAL;

Просмотреть файл

@ -448,8 +448,7 @@ void evlist__toggle_enable(struct evlist *evlist)
(evlist->enabled ? evlist__disable : evlist__enable)(evlist);
}
static int perf_evlist__enable_event_cpu(struct evlist *evlist,
struct evsel *evsel, int cpu)
static int evlist__enable_event_cpu(struct evlist *evlist, struct evsel *evsel, int cpu)
{
int thread;
int nr_threads = perf_evlist__nr_threads(evlist, evsel);
@ -465,9 +464,7 @@ static int perf_evlist__enable_event_cpu(struct evlist *evlist,
return 0;
}
static int perf_evlist__enable_event_thread(struct evlist *evlist,
struct evsel *evsel,
int thread)
static int evlist__enable_event_thread(struct evlist *evlist, struct evsel *evsel, int thread)
{
int cpu;
int nr_cpus = perf_cpu_map__nr(evlist->core.cpus);
@ -483,15 +480,14 @@ static int perf_evlist__enable_event_thread(struct evlist *evlist,
return 0;
}
int perf_evlist__enable_event_idx(struct evlist *evlist,
struct evsel *evsel, int idx)
int evlist__enable_event_idx(struct evlist *evlist, struct evsel *evsel, int idx)
{
bool per_cpu_mmaps = !perf_cpu_map__empty(evlist->core.cpus);
if (per_cpu_mmaps)
return perf_evlist__enable_event_cpu(evlist, evsel, idx);
else
return perf_evlist__enable_event_thread(evlist, evsel, idx);
return evlist__enable_event_cpu(evlist, evsel, idx);
return evlist__enable_event_thread(evlist, evsel, idx);
}
int evlist__add_pollfd(struct evlist *evlist, int fd)

Просмотреть файл

@ -190,8 +190,7 @@ void evlist__disable(struct evlist *evlist);
void evlist__enable(struct evlist *evlist);
void evlist__toggle_enable(struct evlist *evlist);
int perf_evlist__enable_event_idx(struct evlist *evlist,
struct evsel *evsel, int idx);
int evlist__enable_event_idx(struct evlist *evlist, struct evsel *evsel, int idx);
void perf_evlist__set_selected(struct evlist *evlist,
struct evsel *evsel);