* [PATCH] perf: fix use_browser infinite loop bug in annotate
@ 2010-05-27 12:50 Stephane Eranian
2010-05-27 14:51 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: Stephane Eranian @ 2010-05-27 12:50 UTC (permalink / raw)
To: linux-kernel
Cc: peterz, mingo, paulus, davem, fweisbec, acme, perfmon2-devel,
eranian, eranian
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;
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] perf: fix use_browser infinite loop bug in annotate
2010-05-27 12:50 [PATCH] perf: fix use_browser infinite loop bug in annotate Stephane Eranian
@ 2010-05-27 14:51 ` Arnaldo Carvalho de Melo
2010-05-27 15:45 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-27 14:51 UTC (permalink / raw)
To: Stephane Eranian
Cc: linux-kernel, peterz, mingo, paulus, davem, fweisbec,
perfmon2-devel, eranian
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 <eranian@google.com>
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;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] perf: fix use_browser infinite loop bug in annotate
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
0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-27 15:45 UTC (permalink / raw)
To: Stephane Eranian
Cc: linux-kernel, peterz, mingo, paulus, davem, fweisbec,
perfmon2-devel, eranian
Em Thu, May 27, 2010 at 11:51:42AM -0300, Arnaldo Carvalho de Melo escreveu:
> 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 <eranian@google.com>
>
> 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.
Oops, I already have this fixed on changeset
62e3436b5f3461662929eae102beefbd12127cb1
That is at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf
http://git.kernel.org/?p=linux/kernel/git/acme/linux-2.6.git;a=commit;h=62e3436b5f3461662929eae102beefbd12127cb1
I pushed this to Ingo yesterday, should be in tip/perf/core soon,
thanks anyway!
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: fix use_browser infinite loop bug in annotate
2010-05-27 15:45 ` Arnaldo Carvalho de Melo
@ 2010-05-27 15:52 ` Stephane Eranian
0 siblings, 0 replies; 4+ messages in thread
From: Stephane Eranian @ 2010-05-27 15:52 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, peterz, mingo, paulus, davem, fweisbec,
perfmon2-devel, eranian
On Thu, May 27, 2010 at 5:45 PM, Arnaldo Carvalho de Melo
<acme@infradead.org> wrote:
> Em Thu, May 27, 2010 at 11:51:42AM -0300, Arnaldo Carvalho de Melo escreveu:
>> 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 <eranian@google.com>
>>
>> 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.
>
> Oops, I already have this fixed on changeset
>
> 62e3436b5f3461662929eae102beefbd12127cb1
>
> That is at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf
>
> http://git.kernel.org/?p=linux/kernel/git/acme/linux-2.6.git;a=commit;h=62e3436b5f3461662929eae102beefbd12127cb1
>
> I pushed this to Ingo yesterday, should be in tip/perf/core soon,
> thanks anyway!
>
Ok, if it's fixed then this is fine. The other problem I reported is
more important.
Thanks for checking.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-27 15:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27 12:50 [PATCH] perf: fix use_browser infinite loop bug in annotate Stephane Eranian
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox