diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/perf/builtin-top.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index b513e40974f..dd625808c2a 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
| @@ -69,7 +69,6 @@ static int target_tid = -1; | |||
| 69 | static pid_t *all_tids = NULL; | 69 | static pid_t *all_tids = NULL; |
| 70 | static int thread_num = 0; | 70 | static int thread_num = 0; |
| 71 | static bool inherit = false; | 71 | static bool inherit = false; |
| 72 | static int profile_cpu = -1; | ||
| 73 | static int nr_cpus = 0; | 72 | static int nr_cpus = 0; |
| 74 | static int realtime_prio = 0; | 73 | static int realtime_prio = 0; |
| 75 | static bool group = false; | 74 | static bool group = false; |
| @@ -558,13 +557,13 @@ static void print_sym_table(void) | |||
| 558 | else | 557 | else |
| 559 | printf(" (all"); | 558 | printf(" (all"); |
| 560 | 559 | ||
| 561 | if (profile_cpu != -1) | 560 | if (cpu_list) |
| 562 | printf(", cpu: %d)\n", profile_cpu); | 561 | printf(", CPU%s: %s)\n", nr_cpus > 1 ? "s" : "", cpu_list); |
| 563 | else { | 562 | else { |
| 564 | if (target_tid != -1) | 563 | if (target_tid != -1) |
| 565 | printf(")\n"); | 564 | printf(")\n"); |
| 566 | else | 565 | else |
| 567 | printf(", %d CPUs)\n", nr_cpus); | 566 | printf(", %d CPU%s)\n", nr_cpus, nr_cpus > 1 ? "s" : ""); |
| 568 | } | 567 | } |
| 569 | 568 | ||
| 570 | printf("%-*.*s\n", win_width, win_width, graph_dotted_line); | 569 | printf("%-*.*s\n", win_width, win_width, graph_dotted_line); |
| @@ -1187,11 +1186,10 @@ int group_fd; | |||
| 1187 | static void start_counter(int i, int counter) | 1186 | static void start_counter(int i, int counter) |
| 1188 | { | 1187 | { |
| 1189 | struct perf_event_attr *attr; | 1188 | struct perf_event_attr *attr; |
| 1190 | int cpu; | 1189 | int cpu = -1; |
| 1191 | int thread_index; | 1190 | int thread_index; |
| 1192 | 1191 | ||
| 1193 | cpu = profile_cpu; | 1192 | if (target_tid == -1) |
| 1194 | if (target_tid == -1 && profile_cpu == -1) | ||
| 1195 | cpu = cpumap[i]; | 1193 | cpu = cpumap[i]; |
| 1196 | 1194 | ||
| 1197 | attr = attrs + counter; | 1195 | attr = attrs + counter; |
