From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757926Ab0E0Ov6 (ORCPT ); Thu, 27 May 2010 10:51:58 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:41156 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755921Ab0E0Ov5 (ORCPT ); Thu, 27 May 2010 10:51:57 -0400 Date: Thu, 27 May 2010 11:51:42 -0300 From: Arnaldo Carvalho de Melo To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@elte.hu, paulus@samba.org, davem@davemloft.net, fweisbec@gmail.com, perfmon2-devel@lists.sf.net, eranian@gmail.com Subject: Re: [PATCH] perf: fix use_browser infinite loop bug in annotate Message-ID: <20100527145142.GJ9874@ghostprotocols.net> References: <4bfe6b18.914ed80a.0573.4c6e@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4bfe6b18.914ed80a.0573.4c6e@mx.google.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-08-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, May 27, 2010 at 02:50:01PM +0200, Stephane Eranian escreveu: > 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 Thanks, I'm applying this one and doing an audit of other uses, I know of one more case reported by Frédéric that was fixed in a similar way. > 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;