diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-03-12 10:20:57 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-12 10:20:59 +0100 |
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 c051833f755..ec4822322ab 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -28,6 +28,7 @@ #include <linux/rbtree.h> #include "util/parse-options.h" #include "util/parse-events.h" +#include "util/cpumap.h" #include "util/debug.h" @@ -1129,7 +1130,7 @@ static void start_counter(int i, int counter) cpu = profile_cpu; if (target_pid == -1 && profile_cpu == -1) - cpu = i; + cpu = cpumap[i]; attr = attrs + counter; @@ -1353,12 +1354,10 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) attrs[counter].sample_period = default_interval; } - nr_cpus = sysconf(_SC_NPROCESSORS_ONLN); - assert(nr_cpus <= MAX_NR_CPUS); - assert(nr_cpus >= 0); - if (target_pid != -1 || profile_cpu != -1) nr_cpus = 1; + else + nr_cpus = read_cpu_map(); get_term_dimensions(&winsize); if (print_entries == 0) { |