perf evlist: Use the right prefix for 'struct evlist' evsel list 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 0a60b339
......@@ -395,7 +395,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
* To obtain the auxtrace buffer file descriptor, the auxtrace
* event must come first.
*/
perf_evlist__to_front(evlist, cs_etm_evsel);
evlist__to_front(evlist, cs_etm_evsel);
/*
* In the case of per-cpu mmaps, we need the CPU on the
......
......@@ -118,7 +118,7 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
* To obtain the auxtrace buffer file descriptor, the auxtrace event
* must come first.
*/
perf_evlist__to_front(evlist, arm_spe_evsel);
evlist__to_front(evlist, arm_spe_evsel);
evsel__set_sample_bit(arm_spe_evsel, CPU);
evsel__set_sample_bit(arm_spe_evsel, TIME);
......
......@@ -218,7 +218,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
* To obtain the auxtrace buffer file descriptor, the auxtrace event
* must come first.
*/
perf_evlist__to_front(evlist, intel_bts_evsel);
evlist__to_front(evlist, intel_bts_evsel);
/*
* In the case of per-cpu mmaps, we need the CPU on the
* AUX event.
......
......@@ -846,7 +846,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
* To obtain the auxtrace buffer file descriptor, the auxtrace
* event must come first.
*/
perf_evlist__to_front(evlist, intel_pt_evsel);
evlist__to_front(evlist, intel_pt_evsel);
/*
* In the case of per-cpu mmaps, we need the CPU on the
* AUX event.
......
......@@ -157,7 +157,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
goto out_delete_evlist;
}
perf_evlist__splice_list_tail(evlist, &parse_state.list);
evlist__splice_list_tail(evlist, &parse_state.list);
evlist->nr_groups = parse_state.nr_groups;
perf_evlist__config(evlist, &opts, NULL);
......
......@@ -26,7 +26,7 @@ static int test_expand_events(struct evlist *evlist,
char **ev_name;
struct evsel *evsel;
TEST_ASSERT_VAL("evlist is empty", !perf_evlist__empty(evlist));
TEST_ASSERT_VAL("evlist is empty", !evlist__empty(evlist));
nr_events = evlist->core.nr_entries;
ev_name = calloc(nr_events, sizeof(*ev_name));
......@@ -161,7 +161,7 @@ static int expand_libpfm_events(void)
event_str, ret);
goto out;
}
if (perf_evlist__empty(evlist)) {
if (evlist__empty(evlist)) {
pr_debug("libpfm was not enabled\n");
goto out;
}
......
......@@ -406,7 +406,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
pr_debug("cycles event already at front");
goto out_err;
}
perf_evlist__to_front(evlist, cycles_evsel);
evlist__to_front(evlist, cycles_evsel);
if (cycles_evsel != evlist__first(evlist)) {
pr_debug("Failed to move cycles event to front");
goto out_err;
......
......@@ -3593,7 +3593,7 @@ static int __evlist__tui_browse_hists(struct evlist *evlist, int nr_entries, con
hbt, warn_lost_event);
}
static bool perf_evlist__single_entry(struct evlist *evlist)
static bool evlist__single_entry(struct evlist *evlist)
{
int nr_entries = evlist->core.nr_entries;
......@@ -3616,7 +3616,7 @@ int evlist__tui_browse_hists(struct evlist *evlist, const char *help, struct his
{
int nr_entries = evlist->core.nr_entries;
if (perf_evlist__single_entry(evlist)) {
if (evlist__single_entry(evlist)) {
single_entry: {
struct evsel *first = evlist__first(evlist);
......
......@@ -371,7 +371,7 @@ int evlist__expand_cgroup(struct evlist *evlist, const char *str,
}
/* save original events and init evlist */
perf_evlist__splice_list_tail(orig_list, &evlist->core.entries);
evlist__splice_list_tail(orig_list, &evlist->core.entries);
evlist->core.nr_entries = 0;
if (metric_events) {
......@@ -430,7 +430,7 @@ int evlist__expand_cgroup(struct evlist *evlist, const char *str,
goto out_err;
}
perf_evlist__splice_list_tail(evlist, &tmp_list->core.entries);
evlist__splice_list_tail(evlist, &tmp_list->core.entries);
tmp_list->core.nr_entries = 0;
}
......
......@@ -177,8 +177,7 @@ void evlist__remove(struct evlist *evlist, struct evsel *evsel)
perf_evlist__remove(&evlist->core, &evsel->core);
}
void perf_evlist__splice_list_tail(struct evlist *evlist,
struct list_head *list)
void evlist__splice_list_tail(struct evlist *evlist, struct list_head *list)
{
struct evsel *evsel, *temp;
......@@ -273,7 +272,7 @@ static int evlist__add_attrs(struct evlist *evlist, struct perf_event_attr *attr
list_add_tail(&evsel->core.node, &head);
}
perf_evlist__splice_list_tail(evlist, &head);
evlist__splice_list_tail(evlist, &head);
return 0;
......@@ -1520,8 +1519,7 @@ int evlist__strerror_mmap(struct evlist *evlist, int err, char *buf, size_t size
return 0;
}
void perf_evlist__to_front(struct evlist *evlist,
struct evsel *move_evsel)
void evlist__to_front(struct evlist *evlist, struct evsel *move_evsel)
{
struct evsel *evsel, *n;
LIST_HEAD(move);
......
......@@ -214,10 +214,9 @@ bool evlist__valid_sample_type(struct evlist *evlist);
bool evlist__valid_sample_id_all(struct evlist *evlist);
bool perf_evlist__valid_read_format(struct evlist *evlist);
void perf_evlist__splice_list_tail(struct evlist *evlist,
struct list_head *list);
void evlist__splice_list_tail(struct evlist *evlist, struct list_head *list);
static inline bool perf_evlist__empty(struct evlist *evlist)
static inline bool evlist__empty(struct evlist *evlist)
{
return list_empty(&evlist->core.entries);
}
......@@ -240,8 +239,7 @@ 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);
void perf_evlist__to_front(struct evlist *evlist,
struct evsel *move_evsel);
void evlist__to_front(struct evlist *evlist, struct evsel *move_evsel);
/**
* __evlist__for_each_entry - iterate thru all the evsels
......
......@@ -2183,7 +2183,7 @@ int __parse_events(struct evlist *evlist, const char *str,
/*
* Add list to the evlist even with errors to allow callers to clean up.
*/
perf_evlist__splice_list_tail(evlist, &parse_state.list);
evlist__splice_list_tail(evlist, &parse_state.list);
if (!ret) {
struct evsel *last;
......
......@@ -2756,7 +2756,7 @@ static const char *get_default_sort_order(struct evlist *evlist)
BUG_ON(sort__mode >= ARRAY_SIZE(default_sort_orders));
if (evlist == NULL || perf_evlist__empty(evlist))
if (evlist == NULL || evlist__empty(evlist))
goto out_no_evlist;
evlist__for_each_entry(evlist, 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