perf evlist: Use the right prefix for 'struct evlist' event selection 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 15:01:08 -03:00
parent 64b4778b86
commit 900c8ead5b
6 changed files with 7 additions and 9 deletions

View File

@ -416,7 +416,7 @@ static int intel_pt_track_switches(struct evlist *evlist)
struct evsel *evsel;
int err;
if (!perf_evlist__can_select_event(evlist, sched_switch))
if (!evlist__can_select_event(evlist, sched_switch))
return -EPERM;
err = parse_events(evlist, sched_switch, NULL);

View File

@ -380,7 +380,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
cycles_evsel = evlist__last(evlist);
/* Third event */
if (!perf_evlist__can_select_event(evlist, sched_switch)) {
if (!evlist__can_select_event(evlist, sched_switch)) {
pr_debug("No sched_switch\n");
err = 0;
goto out;

View File

@ -3494,7 +3494,7 @@ static int perf_evsel_menu__run(struct evsel_menu *menu,
continue;
pos = menu->selection;
browse_hists:
perf_evlist__set_selected(evlist, pos);
evlist__set_selected(evlist, pos);
/*
* Give the calling tool a chance to populate the non
* default evsel resorted hists tree.

View File

@ -1183,8 +1183,7 @@ bool evlist__sample_id_all(struct evlist *evlist)
return first->core.attr.sample_id_all;
}
void perf_evlist__set_selected(struct evlist *evlist,
struct evsel *evsel)
void evlist__set_selected(struct evlist *evlist, struct evsel *evsel)
{
evlist->selected = evsel;
}

View File

@ -192,8 +192,7 @@ void evlist__toggle_enable(struct evlist *evlist);
int evlist__enable_event_idx(struct evlist *evlist, struct evsel *evsel, int idx);
void perf_evlist__set_selected(struct evlist *evlist,
struct evsel *evsel);
void evlist__set_selected(struct evlist *evlist, struct evsel *evsel);
int evlist__create_maps(struct evlist *evlist, struct target *target);
int evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel);
@ -238,7 +237,7 @@ static inline struct evsel *evlist__last(struct evlist *evlist)
int evlist__strerror_open(struct evlist *evlist, int err, char *buf, size_t size);
int evlist__strerror_mmap(struct evlist *evlist, int err, char *buf, size_t size);
bool perf_evlist__can_select_event(struct evlist *evlist, const char *str);
bool evlist__can_select_event(struct evlist *evlist, const char *str);
void evlist__to_front(struct evlist *evlist, struct evsel *move_evsel);
/**

View File

@ -217,7 +217,7 @@ int record_opts__config(struct record_opts *opts)
return record_opts__config_freq(opts);
}
bool perf_evlist__can_select_event(struct evlist *evlist, const char *str)
bool evlist__can_select_event(struct evlist *evlist, const char *str)
{
struct evlist *temp_evlist;
struct evsel *evsel;