diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-04-25 15:25:20 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-05-15 08:32:52 -0400 |
commit | b90194181988063266f3da0b7bf3e57268c627c8 (patch) | |
tree | 2905313dda005f9b1bc8dd7ac3622c7367bddbb5 /tools | |
parent | f4929bd37208540c2c6f416e9035ff1938f2dbc6 (diff) |
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 <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Link: http://lkml.kernel.org/r/20110426204401.GB1746@ghostprotocols.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/evlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 45da8d186b49..1884a7c7eb8f 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, | |||
348 | if (evlist->threads == NULL) | 348 | if (evlist->threads == NULL) |
349 | return -1; | 349 | return -1; |
350 | 350 | ||
351 | if (target_tid != -1) | 351 | if (cpu_list == NULL && target_tid != -1) |
352 | evlist->cpus = cpu_map__dummy_new(); | 352 | evlist->cpus = cpu_map__dummy_new(); |
353 | else | 353 | else |
354 | evlist->cpus = cpu_map__new(cpu_list); | 354 | evlist->cpus = cpu_map__new(cpu_list); |