perf evlist: Use the right prefix for 'struct evlist' 'filter' 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 09:38:02 -03:00
Родитель ade9d208d6
Коммит 24bf91a754
5 изменённых файлов: 24 добавлений и 24 удалений

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

@ -946,7 +946,7 @@ try_again:
"even with a suitable vmlinux or kallsyms file.\n\n");
}
if (perf_evlist__apply_filters(evlist, &pos)) {
if (evlist__apply_filters(evlist, &pos)) {
pr_err("failed to set filter \"%s\" on event %s with %d (%s)\n",
pos->filter, evsel__name(pos), errno,
str_error_r(errno, msg, sizeof(msg)));

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

@ -842,7 +842,7 @@ try_again_reset:
return -1;
}
if (perf_evlist__apply_filters(evsel_list, &counter)) {
if (evlist__apply_filters(evsel_list, &counter)) {
pr_err("failed to set filter \"%s\" on event %s with %d (%s)\n",
counter->filter, evsel__name(counter), errno,
str_error_r(errno, msg, sizeof(msg)));

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

@ -3666,7 +3666,7 @@ static int trace__set_filter_loop_pids(struct trace *trace)
thread = parent;
}
err = perf_evlist__append_tp_filter_pids(trace->evlist, nr, pids);
err = evlist__append_tp_filter_pids(trace->evlist, nr, pids);
if (!err && trace->filter_pids.map)
err = bpf_map__set_filter_pids(trace->filter_pids.map, nr, pids);
@ -3683,8 +3683,8 @@ static int trace__set_filter_pids(struct trace *trace)
* we fork the workload in evlist__prepare_workload.
*/
if (trace->filter_pids.nr > 0) {
err = perf_evlist__append_tp_filter_pids(trace->evlist, trace->filter_pids.nr,
trace->filter_pids.entries);
err = evlist__append_tp_filter_pids(trace->evlist, trace->filter_pids.nr,
trace->filter_pids.entries);
if (!err && trace->filter_pids.map) {
err = bpf_map__set_filter_pids(trace->filter_pids.map, trace->filter_pids.nr,
trace->filter_pids.entries);
@ -4027,7 +4027,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
err = trace__expand_filters(trace, &evsel);
if (err)
goto out_delete_evlist;
err = perf_evlist__apply_filters(evlist, &evsel);
err = evlist__apply_filters(evlist, &evsel);
if (err < 0)
goto out_error_apply_filters;

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

@ -975,7 +975,7 @@ void __perf_evlist__reset_sample_bit(struct evlist *evlist,
__evsel__reset_sample_bit(evsel, bit);
}
int perf_evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel)
int evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel)
{
struct evsel *evsel;
int err = 0;
@ -998,7 +998,7 @@ int perf_evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel)
return err;
}
int perf_evlist__set_tp_filter(struct evlist *evlist, const char *filter)
int evlist__set_tp_filter(struct evlist *evlist, const char *filter)
{
struct evsel *evsel;
int err = 0;
@ -1018,7 +1018,7 @@ int perf_evlist__set_tp_filter(struct evlist *evlist, const char *filter)
return err;
}
int perf_evlist__append_tp_filter(struct evlist *evlist, const char *filter)
int evlist__append_tp_filter(struct evlist *evlist, const char *filter)
{
struct evsel *evsel;
int err = 0;
@ -1064,32 +1064,32 @@ out_free:
return NULL;
}
int perf_evlist__set_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids)
int evlist__set_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids)
{
char *filter = asprintf__tp_filter_pids(npids, pids);
int ret = perf_evlist__set_tp_filter(evlist, filter);
int ret = evlist__set_tp_filter(evlist, filter);
free(filter);
return ret;
}
int perf_evlist__set_tp_filter_pid(struct evlist *evlist, pid_t pid)
int evlist__set_tp_filter_pid(struct evlist *evlist, pid_t pid)
{
return perf_evlist__set_tp_filter_pids(evlist, 1, &pid);
return evlist__set_tp_filter_pids(evlist, 1, &pid);
}
int perf_evlist__append_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids)
int evlist__append_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids)
{
char *filter = asprintf__tp_filter_pids(npids, pids);
int ret = perf_evlist__append_tp_filter(evlist, filter);
int ret = evlist__append_tp_filter(evlist, filter);
free(filter);
return ret;
}
int perf_evlist__append_tp_filter_pid(struct evlist *evlist, pid_t pid)
int evlist__append_tp_filter_pid(struct evlist *evlist, pid_t pid)
{
return perf_evlist__append_tp_filter_pids(evlist, 1, &pid);
return evlist__append_tp_filter_pids(evlist, 1, &pid);
}
bool evlist__valid_sample_type(struct evlist *evlist)

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

@ -141,14 +141,14 @@ void __perf_evlist__reset_sample_bit(struct evlist *evlist,
#define perf_evlist__reset_sample_bit(evlist, bit) \
__perf_evlist__reset_sample_bit(evlist, PERF_SAMPLE_##bit)
int perf_evlist__set_tp_filter(struct evlist *evlist, const char *filter);
int perf_evlist__set_tp_filter_pid(struct evlist *evlist, pid_t pid);
int perf_evlist__set_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids);
int evlist__set_tp_filter(struct evlist *evlist, const char *filter);
int evlist__set_tp_filter_pid(struct evlist *evlist, pid_t pid);
int evlist__set_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids);
int perf_evlist__append_tp_filter(struct evlist *evlist, const char *filter);
int evlist__append_tp_filter(struct evlist *evlist, const char *filter);
int perf_evlist__append_tp_filter_pid(struct evlist *evlist, pid_t pid);
int perf_evlist__append_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids);
int evlist__append_tp_filter_pid(struct evlist *evlist, pid_t pid);
int evlist__append_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids);
struct evsel *
perf_evlist__find_tracepoint_by_id(struct evlist *evlist, int id);
@ -216,7 +216,7 @@ void perf_evlist__set_selected(struct evlist *evlist,
struct evsel *evsel);
int perf_evlist__create_maps(struct evlist *evlist, struct target *target);
int perf_evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel);
int evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel);
void __evlist__set_leader(struct list_head *list);
void evlist__set_leader(struct evlist *evlist);