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:
parent
ade9d208d6
commit
24bf91a754
@ -946,7 +946,7 @@ try_again:
|
|||||||
"even with a suitable vmlinux or kallsyms file.\n\n");
|
"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",
|
pr_err("failed to set filter \"%s\" on event %s with %d (%s)\n",
|
||||||
pos->filter, evsel__name(pos), errno,
|
pos->filter, evsel__name(pos), errno,
|
||||||
str_error_r(errno, msg, sizeof(msg)));
|
str_error_r(errno, msg, sizeof(msg)));
|
||||||
|
@ -842,7 +842,7 @@ try_again_reset:
|
|||||||
return -1;
|
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",
|
pr_err("failed to set filter \"%s\" on event %s with %d (%s)\n",
|
||||||
counter->filter, evsel__name(counter), errno,
|
counter->filter, evsel__name(counter), errno,
|
||||||
str_error_r(errno, msg, sizeof(msg)));
|
str_error_r(errno, msg, sizeof(msg)));
|
||||||
|
@ -3666,7 +3666,7 @@ static int trace__set_filter_loop_pids(struct trace *trace)
|
|||||||
thread = parent;
|
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)
|
if (!err && trace->filter_pids.map)
|
||||||
err = bpf_map__set_filter_pids(trace->filter_pids.map, nr, pids);
|
err = bpf_map__set_filter_pids(trace->filter_pids.map, nr, pids);
|
||||||
|
|
||||||
@ -3683,7 +3683,7 @@ static int trace__set_filter_pids(struct trace *trace)
|
|||||||
* we fork the workload in evlist__prepare_workload.
|
* we fork the workload in evlist__prepare_workload.
|
||||||
*/
|
*/
|
||||||
if (trace->filter_pids.nr > 0) {
|
if (trace->filter_pids.nr > 0) {
|
||||||
err = perf_evlist__append_tp_filter_pids(trace->evlist, trace->filter_pids.nr,
|
err = evlist__append_tp_filter_pids(trace->evlist, trace->filter_pids.nr,
|
||||||
trace->filter_pids.entries);
|
trace->filter_pids.entries);
|
||||||
if (!err && trace->filter_pids.map) {
|
if (!err && trace->filter_pids.map) {
|
||||||
err = bpf_map__set_filter_pids(trace->filter_pids.map, trace->filter_pids.nr,
|
err = bpf_map__set_filter_pids(trace->filter_pids.map, trace->filter_pids.nr,
|
||||||
@ -4027,7 +4027,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
|
|||||||
err = trace__expand_filters(trace, &evsel);
|
err = trace__expand_filters(trace, &evsel);
|
||||||
if (err)
|
if (err)
|
||||||
goto out_delete_evlist;
|
goto out_delete_evlist;
|
||||||
err = perf_evlist__apply_filters(evlist, &evsel);
|
err = evlist__apply_filters(evlist, &evsel);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto out_error_apply_filters;
|
goto out_error_apply_filters;
|
||||||
|
|
||||||
|
@ -975,7 +975,7 @@ void __perf_evlist__reset_sample_bit(struct evlist *evlist,
|
|||||||
__evsel__reset_sample_bit(evsel, bit);
|
__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;
|
struct evsel *evsel;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@ -998,7 +998,7 @@ int perf_evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel)
|
|||||||
return err;
|
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;
|
struct evsel *evsel;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@ -1018,7 +1018,7 @@ int perf_evlist__set_tp_filter(struct evlist *evlist, const char *filter)
|
|||||||
return err;
|
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;
|
struct evsel *evsel;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@ -1064,32 +1064,32 @@ out_free:
|
|||||||
return NULL;
|
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);
|
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);
|
free(filter);
|
||||||
return ret;
|
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);
|
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);
|
free(filter);
|
||||||
return ret;
|
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)
|
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) \
|
#define perf_evlist__reset_sample_bit(evlist, bit) \
|
||||||
__perf_evlist__reset_sample_bit(evlist, PERF_SAMPLE_##bit)
|
__perf_evlist__reset_sample_bit(evlist, PERF_SAMPLE_##bit)
|
||||||
|
|
||||||
int perf_evlist__set_tp_filter(struct evlist *evlist, const char *filter);
|
int evlist__set_tp_filter(struct evlist *evlist, const char *filter);
|
||||||
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);
|
||||||
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);
|
||||||
|
|
||||||
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 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_pids(struct evlist *evlist, size_t npids, pid_t *pids);
|
||||||
|
|
||||||
struct evsel *
|
struct evsel *
|
||||||
perf_evlist__find_tracepoint_by_id(struct evlist *evlist, int id);
|
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);
|
struct evsel *evsel);
|
||||||
|
|
||||||
int perf_evlist__create_maps(struct evlist *evlist, struct target *target);
|
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 list_head *list);
|
||||||
void evlist__set_leader(struct evlist *evlist);
|
void evlist__set_leader(struct evlist *evlist);
|
||||||
|
Loading…
Reference in New Issue
Block a user