mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, paulus@samba.org,
	davem@davemloft.net, fweisbec@gmail.com, acme@infradead.org,
	perfmon2-devel@lists.sf.net, eranian@gmail.com,
	eranian@google.com
Subject: [PATCH] perf: fix use_browser infinite loop bug in annotate
Date: Thu, 27 May 2010 14:50:01 +0200	[thread overview]
Message-ID: <4bfe6b18.914ed80a.0573.4c6e@mx.google.com> (raw)

This patch fixes an infinite loop problem with perf annotate when
the TUI is not used. When the perfconfig file is not found use_browser
remains at -1, when found and tui is disabled use_browser = 0. Thus the
correct test for TUI is use_browser > 0.

Signed-off-by: Stephane Eranian <eranian@google.com>

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 08278ed..96db524 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -343,7 +343,7 @@ find_next:
 			continue;
 		}
 
-		if (use_browser) {
+		if (use_browser > 0) {
 			key = hist_entry__tui_annotate(he);
 			if (is_exit_key(key))
 				break;

             reply	other threads:[~2010-05-27 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 12:50 Stephane Eranian [this message]
2010-05-27 14:51 ` Arnaldo Carvalho de Melo
2010-05-27 15:45   ` Arnaldo Carvalho de Melo
2010-05-27 15:52     ` Stephane Eranian

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=4bfe6b18.914ed80a.0573.4c6e@mx.google.com \
    --to=eranian@google.com \
    --cc=acme@infradead.org \
    --cc=davem@davemloft.net \
    --cc=eranian@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=perfmon2-devel@lists.sf.net \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®