summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-03-12 10:20:57 +0100
committerIngo Molnar <mingo@elte.hu>2010-03-12 10:20:59 +0100
commit937779db13fb6cb621e28d9ae0a6cf1d05b57d05 (patch)
tree6c27402677c347c4dc01980de78c270630588847 /tools/perf/builtin-top.c
parent6230f2c7ef01a69e2ba9370326572c287209d32a (diff)
parent9f591fd76afdc0e5192e9ed00a36f8efc0b4dfe6 (diff)
downloadtalos-op-linux-937779db13fb6cb621e28d9ae0a6cf1d05b57d05.tar.gz
talos-op-linux-937779db13fb6cb621e28d9ae0a6cf1d05b57d05.zip
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.c9
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 @@
#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) {
OpenPOWER on IntegriCloud