linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Namhyung Kim <namhyung.kim@lge.com>,
	Namhyung Kim <namhyung@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 3/7] perf annotate: Print asm code as blue when source code is displayed
Date: Mon,  5 Mar 2012 12:55:28 -0300	[thread overview]
Message-ID: <1330962932-1796-4-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1330962932-1796-1-git-send-email-acme@infradead.org>

From: Namhyung Kim <namhyung.kim@lge.com>

Print unselected asm code lines as blue. This is what we do now for
--stdio.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1329986784-4916-2-git-send-email-namhyung.kim@lge.com
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/ui/browsers/annotate.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c
index 295a9c9..76caae9 100644
--- a/tools/perf/util/ui/browsers/annotate.c
+++ b/tools/perf/util/ui/browsers/annotate.c
@@ -69,14 +69,17 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
 	if (!self->navkeypressed)
 		width += 1;
 
+	if (!ab->hide_src_code && ol->offset != -1)
+		if (!current_entry || (self->use_navkeypressed &&
+				       !self->navkeypressed))
+			ui_browser__set_color(self, HE_COLORSET_CODE);
+
 	if (!*ol->line)
 		slsmg_write_nstring(" ", width - 18);
 	else
 		slsmg_write_nstring(ol->line, width - 18);
 
-	if (!current_entry)
-		ui_browser__set_color(self, HE_COLORSET_CODE);
-	else
+	if (current_entry)
 		ab->selection = ol;
 }
 
-- 
1.7.9.2.358.g22243


  parent reply	other threads:[~2012-03-05 15:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 15:55 [GIT PULL 0/7] perf/core improvements and fixes Arnaldo Carvalho de Melo
2012-03-05 15:55 ` [PATCH 1/7] perf evlist: Restore original errno after open failed Arnaldo Carvalho de Melo
2012-03-05 15:55 ` [PATCH 2/7] perf tools: Add descriptions of missing Makefile arguments Arnaldo Carvalho de Melo
2012-03-05 15:55 ` Arnaldo Carvalho de Melo [this message]
2012-03-05 15:55 ` [PATCH 4/7] perf annotate: Handle lower case key code in annotate_browser__run() Arnaldo Carvalho de Melo
2012-03-05 15:55 ` [PATCH 5/7] perf annotate: Restore title when came back to original symbol Arnaldo Carvalho de Melo
2012-03-05 15:55 ` [PATCH 6/7] perf annotate: Fix help string on tui Arnaldo Carvalho de Melo
2012-03-05 15:55 ` [PATCH 7/7] perf annotate: Add missing newline on error message Arnaldo Carvalho de Melo
2012-03-05 16:02 ` [GIT PULL 0/7] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330962932-1796-4-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@gmail.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).