From 4e36dc01ea0f58f07a1f9a2fb943a83d90c882e9 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 8 Jun 2009 23:15:28 +0200 Subject: [PATCH] --- yaml --- r: 147709 b: refs/heads/master c: aefcf37b82886260d8540c9fb815e613c8977e06 h: refs/heads/master i: 147707: 1f3d352eaf1c9521be678e52d82f82f1623b34c1 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-annotate.c | 5 +++-- trunk/tools/perf/builtin-report.c | 13 ++++++++----- trunk/tools/perf/builtin-top.c | 13 ++++++++----- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index bd0a5789eb40..d77554e4c962 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 80d496be89ed7dede5abee5c057634e80a31c82d +refs/heads/master: aefcf37b82886260d8540c9fb815e613c8977e06 diff --git a/trunk/tools/perf/builtin-annotate.c b/trunk/tools/perf/builtin-annotate.c index 0e23fe98ec4e..3334a8bb1d51 100644 --- a/trunk/tools/perf/builtin-annotate.c +++ b/trunk/tools/perf/builtin-annotate.c @@ -1085,8 +1085,9 @@ parse_line(FILE *file, struct symbol *sym, uint64_t start, uint64_t len) percent = 100.0 * hits / sym->hist_sum; /* - * We color high-overhead entries in red, low-overhead - * entries in green - and keep the middle ground normal: + * We color high-overhead entries in red, mid-overhead + * entries in green - and keep the low overhead places + * normal: */ if (percent >= 5.0) color = PERF_COLOR_RED; diff --git a/trunk/tools/perf/builtin-report.c b/trunk/tools/perf/builtin-report.c index 61d871849b44..0b18cb99a858 100644 --- a/trunk/tools/perf/builtin-report.c +++ b/trunk/tools/perf/builtin-report.c @@ -693,13 +693,16 @@ hist_entry__fprintf(FILE *fp, struct hist_entry *self, uint64_t total_samples) char *color = PERF_COLOR_NORMAL; /* - * We color high-overhead entries in red, low-overhead - * entries in green - and keep the middle ground normal: + * We color high-overhead entries in red, mid-overhead + * entries in green - and keep the low overhead places + * normal: */ - if (percent >= 5.0) + if (percent >= 5.0) { color = PERF_COLOR_RED; - if (percent < 0.5) - color = PERF_COLOR_GREEN; + } else { + if (percent >= 0.5) + color = PERF_COLOR_GREEN; + } ret = color_fprintf(fp, color, " %6.2f%%", (self->count * 100.0) / total_samples); diff --git a/trunk/tools/perf/builtin-top.c b/trunk/tools/perf/builtin-top.c index be1698f1189b..8ba24808a392 100644 --- a/trunk/tools/perf/builtin-top.c +++ b/trunk/tools/perf/builtin-top.c @@ -248,13 +248,16 @@ static void print_sym_table(void) sum_ksamples)); /* - * We color high-overhead entries in red, low-overhead - * entries in green - and keep the middle ground normal: + * We color high-overhead entries in red, mid-overhead + * entries in green - and keep the low overhead places + * normal: */ - if (pcnt >= 5.0) + if (pcnt >= 5.0) { color = PERF_COLOR_RED; - if (pcnt < 0.5) - color = PERF_COLOR_GREEN; + } else { + if (pcnt >= 0.5) + color = PERF_COLOR_GREEN; + } if (nr_counters == 1) printf("%20.2f - ", syme->weight);