diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-stat.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 52c176cc683e..3840a70f05b7 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -32,6 +32,7 @@ | |||
32 | * Wu Fengguang <fengguang.wu@intel.com> | 32 | * Wu Fengguang <fengguang.wu@intel.com> |
33 | * Mike Galbraith <efault@gmx.de> | 33 | * Mike Galbraith <efault@gmx.de> |
34 | * Paul Mackerras <paulus@samba.org> | 34 | * Paul Mackerras <paulus@samba.org> |
35 | * Jaswinder Singh Rajput <jaswinder@kernel.org> | ||
35 | * | 36 | * |
36 | * Released under the GPL v2. (and only v2, not any later version) | 37 | * Released under the GPL v2. (and only v2, not any later version) |
37 | */ | 38 | */ |
@@ -251,7 +252,7 @@ static void nsec_printout(int counter, u64 *count, u64 *noise) | |||
251 | { | 252 | { |
252 | double msecs = (double)count[0] / 1000000; | 253 | double msecs = (double)count[0] / 1000000; |
253 | 254 | ||
254 | fprintf(stderr, " %14.6f %-20s", msecs, event_name(counter)); | 255 | fprintf(stderr, " %14.6f %-24s", msecs, event_name(counter)); |
255 | 256 | ||
256 | if (attrs[counter].type == PERF_TYPE_SOFTWARE && | 257 | if (attrs[counter].type == PERF_TYPE_SOFTWARE && |
257 | attrs[counter].config == PERF_COUNT_SW_TASK_CLOCK) { | 258 | attrs[counter].config == PERF_COUNT_SW_TASK_CLOCK) { |
@@ -265,7 +266,7 @@ static void nsec_printout(int counter, u64 *count, u64 *noise) | |||
265 | 266 | ||
266 | static void abs_printout(int counter, u64 *count, u64 *noise) | 267 | static void abs_printout(int counter, u64 *count, u64 *noise) |
267 | { | 268 | { |
268 | fprintf(stderr, " %14Ld %-20s", count[0], event_name(counter)); | 269 | fprintf(stderr, " %14Ld %-24s", count[0], event_name(counter)); |
269 | 270 | ||
270 | if (runtime_cycles_avg && | 271 | if (runtime_cycles_avg && |
271 | attrs[counter].type == PERF_TYPE_HARDWARE && | 272 | attrs[counter].type == PERF_TYPE_HARDWARE && |
@@ -295,7 +296,7 @@ static void print_counter(int counter) | |||
295 | scaled = event_scaled_avg[counter]; | 296 | scaled = event_scaled_avg[counter]; |
296 | 297 | ||
297 | if (scaled == -1) { | 298 | if (scaled == -1) { |
298 | fprintf(stderr, " %14s %-20s\n", | 299 | fprintf(stderr, " %14s %-24s\n", |
299 | "<not counted>", event_name(counter)); | 300 | "<not counted>", event_name(counter)); |
300 | return; | 301 | return; |
301 | } | 302 | } |
@@ -306,8 +307,7 @@ static void print_counter(int counter) | |||
306 | abs_printout(counter, count, noise); | 307 | abs_printout(counter, count, noise); |
307 | 308 | ||
308 | if (scaled) | 309 | if (scaled) |
309 | fprintf(stderr, " (scaled from %.2f%%)", | 310 | fprintf(stderr, " (%7.2fx scaled)", (double)count[1]/count[2]); |
310 | (double) count[2] / count[1] * 100); | ||
311 | 311 | ||
312 | fprintf(stderr, "\n"); | 312 | fprintf(stderr, "\n"); |
313 | } | 313 | } |
@@ -421,7 +421,6 @@ static void print_stat(int argc, const char **argv) | |||
421 | for (counter = 0; counter < nr_counters; counter++) | 421 | for (counter = 0; counter < nr_counters; counter++) |
422 | print_counter(counter); | 422 | print_counter(counter); |
423 | 423 | ||
424 | |||
425 | fprintf(stderr, "\n"); | 424 | fprintf(stderr, "\n"); |
426 | fprintf(stderr, " %14.9f seconds time elapsed", | 425 | fprintf(stderr, " %14.9f seconds time elapsed", |
427 | (double)walltime_nsecs_avg/1e9); | 426 | (double)walltime_nsecs_avg/1e9); |