From efc35331d561d36395525968939231cc87566344 Mon Sep 17 00:00:00 2001 From: Corey Ashford Date: Mon, 8 Nov 2010 18:20:45 -0800 Subject: [PATCH] --- yaml --- r: 221802 b: refs/heads/master c: 01797c599816d39dfea47864c0f90cd50845811f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-top.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 2923da08b551..d44708a65516 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a3da8e451321c31d88cebd12c234d0aac2a1cc35 +refs/heads/master: 01797c599816d39dfea47864c0f90cd50845811f diff --git a/trunk/tools/perf/builtin-top.c b/trunk/tools/perf/builtin-top.c index b513e40974f4..dd625808c2a5 100644 --- a/trunk/tools/perf/builtin-top.c +++ b/trunk/tools/perf/builtin-top.c @@ -69,7 +69,6 @@ static int target_tid = -1; static pid_t *all_tids = NULL; static int thread_num = 0; static bool inherit = false; -static int profile_cpu = -1; static int nr_cpus = 0; static int realtime_prio = 0; static bool group = false; @@ -558,13 +557,13 @@ static void print_sym_table(void) else printf(" (all"); - if (profile_cpu != -1) - printf(", cpu: %d)\n", profile_cpu); + if (cpu_list) + printf(", CPU%s: %s)\n", nr_cpus > 1 ? "s" : "", cpu_list); else { if (target_tid != -1) printf(")\n"); else - printf(", %d CPUs)\n", nr_cpus); + printf(", %d CPU%s)\n", nr_cpus, nr_cpus > 1 ? "s" : ""); } printf("%-*.*s\n", win_width, win_width, graph_dotted_line); @@ -1187,11 +1186,10 @@ int group_fd; static void start_counter(int i, int counter) { struct perf_event_attr *attr; - int cpu; + int cpu = -1; int thread_index; - cpu = profile_cpu; - if (target_tid == -1 && profile_cpu == -1) + if (target_tid == -1) cpu = cpumap[i]; attr = attrs + counter;