diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-03-12 04:20:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-12 04:20:59 -0500 |
commit | 937779db13fb6cb621e28d9ae0a6cf1d05b57d05 (patch) | |
tree | 6c27402677c347c4dc01980de78c270630588847 /tools/perf/builtin-top.c | |
parent | 6230f2c7ef01a69e2ba9370326572c287209d32a (diff) | |
parent | 9f591fd76afdc0e5192e9ed00a36f8efc0b4dfe6 (diff) |
Merge branch 'perf/urgent' into perf/core
Merge reason: We want to queue up a dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index c051833f755c..ec4822322abd 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/rbtree.h> | 28 | #include <linux/rbtree.h> |
29 | #include "util/parse-options.h" | 29 | #include "util/parse-options.h" |
30 | #include "util/parse-events.h" | 30 | #include "util/parse-events.h" |
31 | #include "util/cpumap.h" | ||
31 | 32 | ||
32 | #include "util/debug.h" | 33 | #include "util/debug.h" |
33 | 34 | ||
@@ -1129,7 +1130,7 @@ static void start_counter(int i, int counter) | |||
1129 | 1130 | ||
1130 | cpu = profile_cpu; | 1131 | cpu = profile_cpu; |
1131 | if (target_pid == -1 && profile_cpu == -1) | 1132 | if (target_pid == -1 && profile_cpu == -1) |
1132 | cpu = i; | 1133 | cpu = cpumap[i]; |
1133 | 1134 | ||
1134 | attr = attrs + counter; | 1135 | attr = attrs + counter; |
1135 | 1136 | ||
@@ -1353,12 +1354,10 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) | |||
1353 | attrs[counter].sample_period = default_interval; | 1354 | attrs[counter].sample_period = default_interval; |
1354 | } | 1355 | } |
1355 | 1356 | ||
1356 | nr_cpus = sysconf(_SC_NPROCESSORS_ONLN); | ||
1357 | assert(nr_cpus <= MAX_NR_CPUS); | ||
1358 | assert(nr_cpus >= 0); | ||
1359 | |||
1360 | if (target_pid != -1 || profile_cpu != -1) | 1357 | if (target_pid != -1 || profile_cpu != -1) |
1361 | nr_cpus = 1; | 1358 | nr_cpus = 1; |
1359 | else | ||
1360 | nr_cpus = read_cpu_map(); | ||
1362 | 1361 | ||
1363 | get_term_dimensions(&winsize); | 1362 | get_term_dimensions(&winsize); |
1364 | if (print_entries == 0) { | 1363 | if (print_entries == 0) { |