diff options
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r-- | tools/perf/util/evlist.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 7080901a2717..a43e2c56d1c6 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -599,18 +599,20 @@ int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages, | |||
599 | return perf_evlist__mmap_per_cpu(evlist, prot, mask); | 599 | return perf_evlist__mmap_per_cpu(evlist, prot, mask); |
600 | } | 600 | } |
601 | 601 | ||
602 | int perf_evlist__create_maps(struct perf_evlist *evlist, const char *target_pid, | 602 | int perf_evlist__create_maps(struct perf_evlist *evlist, |
603 | const char *target_tid, uid_t uid, const char *cpu_list) | 603 | struct perf_target *target) |
604 | { | 604 | { |
605 | evlist->threads = thread_map__new_str(target_pid, target_tid, uid); | 605 | evlist->threads = thread_map__new_str(target->pid, target->tid, |
606 | target->uid); | ||
606 | 607 | ||
607 | if (evlist->threads == NULL) | 608 | if (evlist->threads == NULL) |
608 | return -1; | 609 | return -1; |
609 | 610 | ||
610 | if (uid != UINT_MAX || (cpu_list == NULL && target_tid)) | 611 | if (target->uid != UINT_MAX || |
612 | (target->cpu_list == NULL && target->tid)) | ||
611 | evlist->cpus = cpu_map__dummy_new(); | 613 | evlist->cpus = cpu_map__dummy_new(); |
612 | else | 614 | else |
613 | evlist->cpus = cpu_map__new(cpu_list); | 615 | evlist->cpus = cpu_map__new(target->cpu_list); |
614 | 616 | ||
615 | if (evlist->cpus == NULL) | 617 | if (evlist->cpus == NULL) |
616 | goto out_delete_threads; | 618 | goto out_delete_threads; |