Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147709
b: refs/heads/master
c: aefcf37
h: refs/heads/master
i:
  147707: 1f3d352
v: v3
  • Loading branch information
Ingo Molnar committed Jun 8, 2009
1 parent 9491f09 commit 4e36dc0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80d496be89ed7dede5abee5c057634e80a31c82d
refs/heads/master: aefcf37b82886260d8540c9fb815e613c8977e06
5 changes: 3 additions & 2 deletions trunk/tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 8 additions & 5 deletions trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 8 additions & 5 deletions trunk/tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4e36dc0

Please sign in to comment.