Skip to contentSkip to conversation

perf annotate browser: Use the percent color for the whole line

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Feb 17, 2011 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  b99976e2d277c963138e090ae17bf835f8a07680
Gitweb:     http://git.kernel.org/tip/b99976e2d277c963138e090ae17bf835f8a07680
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Wed, 9 Feb 2011 13:59:14 -0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 16 Feb 2011 14:47:55 -0200

perf annotate browser: Use the percent color for the whole line

Not just for the percentage number, to see the hot lines more easily.

Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
LKML-Reference: <new-submission>

---
 tools/perf/util/ui/browsers/annotate.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
tools/perf/util/ui/browsers/annotate.c +3 -2
index 1aa3965..cfb5a27 100644
@@ -44,8 +44,6 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
 		struct objdump_line_rb_node *olrb = objdump_line__rb(ol);
 		ui_browser__set_percent_color(self, olrb->percent, current_entry);
 		slsmg_printf(" %7.2f ", olrb->percent);
-		if (!current_entry)
-			ui_browser__set_color(self, HE_COLORSET_CODE);
 	} else {
 		ui_browser__set_percent_color(self, 0, current_entry);
 		slsmg_write_nstring(" ", 9);
@@ -57,6 +55,9 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
 		slsmg_write_nstring(" ", width - 18);
 	else
 		slsmg_write_nstring(ol->line, width - 18);
+
+	if (!current_entry)
+		ui_browser__set_color(self, HE_COLORSET_CODE);
 }
 
 static double objdump_line__calc_percent(struct objdump_line *self,