From: Arnaldo Carvalho de Melo Date: Mon, 25 Apr 2011 19:25:20 +0000 (-0300) Subject: perf tools: Honour the cpu list parameter when also monitoring a thread list X-Git-Tag: v2.6.39~7^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b90194181988063266f3da0b7bf3e57268c627c8;p=platform%2Fkernel%2Flinux-stable.git perf tools: Honour the cpu list parameter when also monitoring a thread list The perf_evlist__create_maps was discarding the --cpu parameter when a --pid or --tid was specified, fix that. Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Zanussi Link: http://lkml.kernel.org/r/20110426204401.GB1746@ghostprotocols.net Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 45da8d1..1884a7c 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -348,7 +348,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, pid_t target_pid, if (evlist->threads == NULL) return -1; - if (target_tid != -1) + if (cpu_list == NULL && target_tid != -1) evlist->cpus = cpu_map__dummy_new(); else evlist->cpus = cpu_map__new(cpu_list);