From: Arnaldo Carvalho de Melo Date: Tue, 18 Oct 2011 17:54:24 +0000 (-0200) Subject: perf top tui: Give color hints just on the percentage, like on --stdio X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=33f62b3fc4edd46d80c4420b81dfcb267c8bdb5e;p=openwrt%2Fstaging%2Fblogic.git perf top tui: Give color hints just on the percentage, like on --stdio And like it was in the old top. Another change so that the familiarity with the old visual is maintained. Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-ypmyx9p0ah4byqaygrnb09x8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c index 0eced19e3bdb..936e641e9f86 100644 --- a/tools/perf/util/ui/browsers/hists.c +++ b/tools/perf/util/ui/browsers/hists.c @@ -579,6 +579,9 @@ static int hist_browser__show_entry(struct hist_browser *self, if (!self->b.navkeypressed) width += 1; + if (!current_entry || !self->b.navkeypressed) + ui_browser__set_color(&self->b, HE_COLORSET_NORMAL); + slsmg_write_nstring(s, width); ++row; ++printed;