perf evlist: Propagate thread maps through the evlist
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / evlist.c
index 214affaf1cf6bdc2a1f7ee8011ef6ff9fff20642..6cfdee68e76398cdb2d53c6950d8c34ea969484a 100644 (file)
@@ -1117,7 +1117,9 @@ static int perf_evlist__propagate_maps(struct perf_evlist *evlist,
                if (!evsel->cpus || target->cpu_list)
                        evsel->cpus = cpu_map__get(evlist->cpus);
 
-               if (!evsel->cpus)
+               evsel->threads = thread_map__get(evlist->threads);
+
+               if (!evsel->cpus || !evsel->threads)
                        return -ENOMEM;
        }