mirror of https://gitee.com/openkylin/linux.git
perf evlist: Use the right prefix for 'struct evlist' create maps 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
7127372419
commit
7748bb7175
|
@ -957,7 +957,7 @@ int cmd_ftrace(int argc, const char **argv)
|
|||
goto out_delete_filters;
|
||||
}
|
||||
|
||||
ret = perf_evlist__create_maps(ftrace.evlist, &ftrace.target);
|
||||
ret = evlist__create_maps(ftrace.evlist, &ftrace.target);
|
||||
if (ret < 0)
|
||||
goto out_delete_evlist;
|
||||
|
||||
|
|
|
@ -1442,7 +1442,7 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (perf_evlist__create_maps(kvm->evlist, &kvm->opts.target) < 0)
|
||||
if (evlist__create_maps(kvm->evlist, &kvm->opts.target) < 0)
|
||||
usage_with_options(live_usage, live_options);
|
||||
|
||||
/*
|
||||
|
|
|
@ -2792,7 +2792,7 @@ int cmd_record(int argc, const char **argv)
|
|||
rec->opts.ignore_missing_thread = rec->opts.target.uid != UINT_MAX || rec->opts.target.pid;
|
||||
|
||||
err = -ENOMEM;
|
||||
if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
|
||||
if (evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
|
||||
usage_with_options(record_usage, record_options);
|
||||
|
||||
err = auxtrace_record__options(rec->itr, rec->evlist, &rec->opts);
|
||||
|
|
|
@ -2249,7 +2249,7 @@ int cmd_stat(int argc, const char **argv)
|
|||
if ((stat_config.aggr_mode == AGGR_THREAD) && (target.system_wide))
|
||||
target.per_thread = true;
|
||||
|
||||
if (perf_evlist__create_maps(evsel_list, &target) < 0) {
|
||||
if (evlist__create_maps(evsel_list, &target) < 0) {
|
||||
if (target__has_task(&target)) {
|
||||
pr_err("Problems finding threads of monitor\n");
|
||||
parse_options_usage(stat_usage, stat_options, "p", 1);
|
||||
|
|
|
@ -1694,7 +1694,7 @@ int cmd_top(int argc, const char **argv)
|
|||
if (target__none(target))
|
||||
target->system_wide = true;
|
||||
|
||||
if (perf_evlist__create_maps(top.evlist, target) < 0) {
|
||||
if (evlist__create_maps(top.evlist, target) < 0) {
|
||||
ui__error("Couldn't create thread/CPU maps: %s\n",
|
||||
errno == ENOENT ? "No such process" : str_error_r(errno, errbuf, sizeof(errbuf)));
|
||||
goto out_delete_evlist;
|
||||
|
|
|
@ -3950,7 +3950,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
|
|||
if (trace->cgroup)
|
||||
evlist__set_default_cgroup(trace->evlist, trace->cgroup);
|
||||
|
||||
err = perf_evlist__create_maps(evlist, &trace->opts.target);
|
||||
err = evlist__create_maps(evlist, &trace->opts.target);
|
||||
if (err < 0) {
|
||||
fprintf(trace->output, "Problems parsing the target to trace, check your options!\n");
|
||||
goto out_delete_evlist;
|
||||
|
|
|
@ -109,7 +109,7 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
|
|||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
err = perf_evlist__create_maps(evlist, &opts.target);
|
||||
err = evlist__create_maps(evlist, &opts.target);
|
||||
if (err < 0) {
|
||||
pr_debug("Not enough memory to create thread/cpu maps\n");
|
||||
goto out_delete_evlist;
|
||||
|
|
|
@ -151,7 +151,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
|
|||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
err = perf_evlist__create_maps(evlist, &opts.target);
|
||||
err = evlist__create_maps(evlist, &opts.target);
|
||||
if (err < 0) {
|
||||
pr_debug("Not enough memory to create thread/cpu maps\n");
|
||||
goto out_delete_evlist;
|
||||
|
|
|
@ -26,7 +26,7 @@ static int attach__enable_on_exec(struct evlist *evlist)
|
|||
|
||||
pr_debug("attaching to spawned child, enable on exec\n");
|
||||
|
||||
err = perf_evlist__create_maps(evlist, &target);
|
||||
err = evlist__create_maps(evlist, &target);
|
||||
if (err < 0) {
|
||||
pr_debug("Not enough memory to create thread/cpu maps\n");
|
||||
return err;
|
||||
|
|
|
@ -54,9 +54,9 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
|
|||
|
||||
evlist__add(evlist, evsel);
|
||||
|
||||
err = perf_evlist__create_maps(evlist, &opts.target);
|
||||
err = evlist__create_maps(evlist, &opts.target);
|
||||
if (err < 0) {
|
||||
pr_debug("%s: perf_evlist__create_maps\n", __func__);
|
||||
pr_debug("%s: evlist__create_maps\n", __func__);
|
||||
goto out_delete_evlist;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
|
|||
* evlist__prepare_workload we'll fill in the only thread
|
||||
* we're monitoring, the one forked there.
|
||||
*/
|
||||
err = perf_evlist__create_maps(evlist, &opts.target);
|
||||
err = evlist__create_maps(evlist, &opts.target);
|
||||
if (err < 0) {
|
||||
pr_debug("Not enough memory to create thread/cpu maps\n");
|
||||
goto out_delete_evlist;
|
||||
|
|
|
@ -892,7 +892,7 @@ int evlist__mmap(struct evlist *evlist, unsigned int pages)
|
|||
return evlist__mmap_ex(evlist, pages, 0, false, 0, PERF_AFFINITY_SYS, 1, 0);
|
||||
}
|
||||
|
||||
int perf_evlist__create_maps(struct evlist *evlist, struct target *target)
|
||||
int evlist__create_maps(struct evlist *evlist, struct target *target)
|
||||
{
|
||||
bool all_threads = (target->per_thread && target->system_wide);
|
||||
struct perf_cpu_map *cpus;
|
||||
|
@ -1223,7 +1223,7 @@ void evlist__close(struct evlist *evlist)
|
|||
}
|
||||
}
|
||||
|
||||
static int perf_evlist__create_syswide_maps(struct evlist *evlist)
|
||||
static int evlist__create_syswide_maps(struct evlist *evlist)
|
||||
{
|
||||
struct perf_cpu_map *cpus;
|
||||
struct perf_thread_map *threads;
|
||||
|
@ -1265,7 +1265,7 @@ int evlist__open(struct evlist *evlist)
|
|||
* as sys_perf_event_open(cpu = -1, thread = -1) is EINVAL
|
||||
*/
|
||||
if (evlist->core.threads == NULL && evlist->core.cpus == NULL) {
|
||||
err = perf_evlist__create_syswide_maps(evlist);
|
||||
err = evlist__create_syswide_maps(evlist);
|
||||
if (err < 0)
|
||||
goto out_err;
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ int evlist__enable_event_idx(struct evlist *evlist, struct evsel *evsel, int idx
|
|||
void perf_evlist__set_selected(struct evlist *evlist,
|
||||
struct evsel *evsel);
|
||||
|
||||
int perf_evlist__create_maps(struct evlist *evlist, struct target *target);
|
||||
int evlist__create_maps(struct evlist *evlist, struct target *target);
|
||||
int evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel);
|
||||
|
||||
void __evlist__set_leader(struct list_head *list);
|
||||
|
|
|
@ -101,7 +101,7 @@ int evlist__start_sb_thread(struct evlist *evlist, struct target *target)
|
|||
if (!evlist)
|
||||
return 0;
|
||||
|
||||
if (perf_evlist__create_maps(evlist, target))
|
||||
if (evlist__create_maps(evlist, target))
|
||||
goto out_delete_evlist;
|
||||
|
||||
if (evlist->core.nr_entries > 1) {
|
||||
|
|
Loading…
Reference in New Issue