diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-04-30 03:03:15 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-04-29 10:06:09 -0400 |
| commit | fce3c786d3a49eff397583b4b62fa38df90db937 (patch) | |
| tree | ed452f0040d4b69cbb83a0c4fb80c83cc44d1ae6 | |
| parent | 2b427e14b77dbf3e05f1bd0785f1d07ea5fe924e (diff) | |
perf stat: Leave more room for percentages
Triple digit percentages do not fit otherwise.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-7y40wib8n005io7hjpn1dsrm@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | tools/perf/builtin-stat.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 2492a0efa4d8..9e596ab98d05 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
| @@ -499,8 +499,8 @@ static void print_stalled_cycles_frontend(int cpu, struct perf_evsel *evsel __us | |||
| 499 | else if (ratio > 10.0) | 499 | else if (ratio > 10.0) |
| 500 | color = PERF_COLOR_YELLOW; | 500 | color = PERF_COLOR_YELLOW; |
| 501 | 501 | ||
| 502 | fprintf(stderr, " # "); | 502 | fprintf(stderr, " # "); |
| 503 | color_fprintf(stderr, color, "%5.2f%%", ratio); | 503 | color_fprintf(stderr, color, "%6.2f%%", ratio); |
| 504 | fprintf(stderr, " frontend cycles idle "); | 504 | fprintf(stderr, " frontend cycles idle "); |
| 505 | } | 505 | } |
| 506 | 506 | ||
| @@ -522,9 +522,9 @@ static void print_stalled_cycles_backend(int cpu, struct perf_evsel *evsel __use | |||
| 522 | else if (ratio > 20.0) | 522 | else if (ratio > 20.0) |
| 523 | color = PERF_COLOR_YELLOW; | 523 | color = PERF_COLOR_YELLOW; |
| 524 | 524 | ||
| 525 | fprintf(stderr, " # "); | 525 | fprintf(stderr, " # "); |
| 526 | color_fprintf(stderr, color, "%5.2f%%", ratio); | 526 | color_fprintf(stderr, color, "%6.2f%%", ratio); |
| 527 | fprintf(stderr, " backend cycles idle "); | 527 | fprintf(stderr, " backend cycles idle "); |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | static void print_branch_misses(int cpu, struct perf_evsel *evsel __used, double avg) | 530 | static void print_branch_misses(int cpu, struct perf_evsel *evsel __used, double avg) |
| @@ -545,8 +545,8 @@ static void print_branch_misses(int cpu, struct perf_evsel *evsel __used, double | |||
| 545 | else if (ratio > 5.0) | 545 | else if (ratio > 5.0) |
| 546 | color = PERF_COLOR_YELLOW; | 546 | color = PERF_COLOR_YELLOW; |
| 547 | 547 | ||
| 548 | fprintf(stderr, " # "); | 548 | fprintf(stderr, " # "); |
| 549 | color_fprintf(stderr, color, "%5.2f%%", ratio); | 549 | color_fprintf(stderr, color, "%6.2f%%", ratio); |
| 550 | fprintf(stderr, " of all branches "); | 550 | fprintf(stderr, " of all branches "); |
| 551 | } | 551 | } |
| 552 | 552 | ||
| @@ -568,8 +568,8 @@ static void print_l1_dcache_misses(int cpu, struct perf_evsel *evsel __used, dou | |||
| 568 | else if (ratio > 5.0) | 568 | else if (ratio > 5.0) |
| 569 | color = PERF_COLOR_YELLOW; | 569 | color = PERF_COLOR_YELLOW; |
| 570 | 570 | ||
| 571 | fprintf(stderr, " # "); | 571 | fprintf(stderr, " # "); |
| 572 | color_fprintf(stderr, color, "%5.2f%%", ratio); | 572 | color_fprintf(stderr, color, "%6.2f%%", ratio); |
| 573 | fprintf(stderr, " of all L1-dcache hits "); | 573 | fprintf(stderr, " of all L1-dcache hits "); |
| 574 | } | 574 | } |
| 575 | 575 | ||
| @@ -607,14 +607,14 @@ static void abs_printout(int cpu, struct perf_evsel *evsel, double avg) | |||
| 607 | if (total) | 607 | if (total) |
| 608 | ratio = avg / total; | 608 | ratio = avg / total; |
| 609 | 609 | ||
| 610 | fprintf(stderr, " # %4.2f insns per cycle ", ratio); | 610 | fprintf(stderr, " # %5.2f insns per cycle ", ratio); |
| 611 | 611 | ||
| 612 | total = avg_stats(&runtime_stalled_cycles_front_stats[cpu]); | 612 | total = avg_stats(&runtime_stalled_cycles_front_stats[cpu]); |
| 613 | total = max(total, avg_stats(&runtime_stalled_cycles_back_stats[cpu])); | 613 | total = max(total, avg_stats(&runtime_stalled_cycles_back_stats[cpu])); |
| 614 | 614 | ||
| 615 | if (total && avg) { | 615 | if (total && avg) { |
| 616 | ratio = total / avg; | 616 | ratio = total / avg; |
| 617 | fprintf(stderr, "\n # %4.2f stalled cycles per insn", ratio); | 617 | fprintf(stderr, "\n # %5.2f stalled cycles per insn", ratio); |
| 618 | } | 618 | } |
| 619 | 619 | ||
| 620 | } else if (perf_evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES) && | 620 | } else if (perf_evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES) && |
