diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 61d871849b44..0b18cb99a858 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -693,13 +693,16 @@ hist_entry__fprintf(FILE *fp, struct hist_entry *self, uint64_t total_samples) | |||
693 | char *color = PERF_COLOR_NORMAL; | 693 | char *color = PERF_COLOR_NORMAL; |
694 | 694 | ||
695 | /* | 695 | /* |
696 | * We color high-overhead entries in red, low-overhead | 696 | * We color high-overhead entries in red, mid-overhead |
697 | * entries in green - and keep the middle ground normal: | 697 | * entries in green - and keep the low overhead places |
698 | * normal: | ||
698 | */ | 699 | */ |
699 | if (percent >= 5.0) | 700 | if (percent >= 5.0) { |
700 | color = PERF_COLOR_RED; | 701 | color = PERF_COLOR_RED; |
701 | if (percent < 0.5) | 702 | } else { |
702 | color = PERF_COLOR_GREEN; | 703 | if (percent >= 0.5) |
704 | color = PERF_COLOR_GREEN; | ||
705 | } | ||
703 | 706 | ||
704 | ret = color_fprintf(fp, color, " %6.2f%%", | 707 | ret = color_fprintf(fp, color, " %6.2f%%", |
705 | (self->count * 100.0) / total_samples); | 708 | (self->count * 100.0) / total_samples); |