From: Namhyung Kim Date: Wed, 16 May 2012 09:45:48 +0000 (+0900) Subject: Revert 'perf evlist: Fix creation of cpu map' X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=879d77d0cbe20ad1d6099a1e16f03b72c0649828;p=openwrt%2Fstaging%2Fblogic.git Revert 'perf evlist: Fix creation of cpu map' The commit 55261f46702c ("perf evlist: Fix creation of cpu map") changed to create a per-task event when no cpu target is specified. However it caused a problem since perf-task do not allow event inheritance due to scalability issues so that the result will contain samples only from parent, not from its children. So we should use perf-task-per-cpu events anyway to get the right result. Revert it. Reported-by: Linus Torvalds Analysed-by: Ingo Molnar Acked-and-tested-by: Peter Zijlstra Signed-off-by: Namhyung Kim Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1337161549-9870-2-git-send-email-namhyung.kim@lge.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 80bef281eee0..87889f325678 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -609,10 +609,10 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, if (evlist->threads == NULL) return -1; - if (perf_target__has_cpu(target)) - evlist->cpus = cpu_map__new(target->cpu_list); - else + if (perf_target__has_task(target)) evlist->cpus = cpu_map__dummy_new(); + else + evlist->cpus = cpu_map__new(target->cpu_list); if (evlist->cpus == NULL) goto out_delete_threads;