diff options
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r-- | tools/perf/util/evlist.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 183b199b0d09..1201daf71719 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -609,12 +609,10 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, | |||
609 | if (evlist->threads == NULL) | 609 | if (evlist->threads == NULL) |
610 | return -1; | 610 | return -1; |
611 | 611 | ||
612 | if (target->uid != UINT_MAX || target->tid) | 612 | if (!perf_target__no_cpu(target)) |
613 | evlist->cpus = cpu_map__dummy_new(); | ||
614 | else if (!target->system_wide && target->cpu_list == NULL) | ||
615 | evlist->cpus = cpu_map__dummy_new(); | ||
616 | else | ||
617 | evlist->cpus = cpu_map__new(target->cpu_list); | 613 | evlist->cpus = cpu_map__new(target->cpu_list); |
614 | else | ||
615 | evlist->cpus = cpu_map__dummy_new(); | ||
618 | 616 | ||
619 | if (evlist->cpus == NULL) | 617 | if (evlist->cpus == NULL) |
620 | goto out_delete_threads; | 618 | goto out_delete_threads; |
@@ -831,7 +829,7 @@ int perf_evlist__prepare_workload(struct perf_evlist *evlist, | |||
831 | exit(-1); | 829 | exit(-1); |
832 | } | 830 | } |
833 | 831 | ||
834 | if (!opts->target.system_wide && !opts->target.tid && !opts->target.pid) | 832 | if (perf_target__none(&opts->target)) |
835 | evlist->threads->map[0] = evlist->workload.pid; | 833 | evlist->threads->map[0] = evlist->workload.pid; |
836 | 834 | ||
837 | close(child_ready_pipe[1]); | 835 | close(child_ready_pipe[1]); |