* [BUG] perf top -> annotate broken; bisected to 69aad6f1
@ 2011-01-11 16:35 Kirill Smelkov
2011-01-11 17:11 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: Kirill Smelkov @ 2011-01-11 16:35 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker, Ingo Molnar, Mike Galbraith, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Tom Zanussi, linux-kernel
Hello up there,
Since 69aad6f1ee69546dea8535ab8f3da9f445d57328 (perf tools: Introduce
event selectors; Jan 3 2011) annotating a symbol in perf top segfaults:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb714cb90 (LWP 4662)]
event_name (evsel=0x0) at util/parse-events.c:274
274 return __event_name(type, config);
(gdb) bt
#0 event_name (evsel=0x0) at util/parse-events.c:274
#1 0x0805f892 in display_thread (arg=0x9422448) at builtin-top.c:359
#2 0xb77234c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#3 0xb732b84e in clone () from /lib/i686/cmov/libc.so.6
It used to work...
Thanks,
Kirill
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [BUG] perf top -> annotate broken; bisected to 69aad6f1 2011-01-11 16:35 [BUG] perf top -> annotate broken; bisected to 69aad6f1 Kirill Smelkov @ 2011-01-11 17:11 ` Arnaldo Carvalho de Melo 2011-01-11 17:23 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 4+ messages in thread From: Arnaldo Carvalho de Melo @ 2011-01-11 17:11 UTC (permalink / raw) To: Kirill Smelkov Cc: Frederic Weisbecker, Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian, Tom Zanussi, linux-kernel Em Tue, Jan 11, 2011 at 07:35:20PM +0300, Kirill Smelkov escreveu: > Hello up there, > > Since 69aad6f1ee69546dea8535ab8f3da9f445d57328 (perf tools: Introduce > event selectors; Jan 3 2011) annotating a symbol in perf top segfaults: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0xb714cb90 (LWP 4662)] > event_name (evsel=0x0) at util/parse-events.c:274 > 274 return __event_name(type, config); > (gdb) bt > #0 event_name (evsel=0x0) at util/parse-events.c:274 > #1 0x0805f892 in display_thread (arg=0x9422448) at builtin-top.c:359 > #2 0xb77234c0 in start_thread () from /lib/i686/cmov/libpthread.so.0 > #3 0xb732b84e in clone () from /lib/i686/cmov/libc.so.6 > > > It used to work... Thanks for the report, working on a fix. - Arnaldo ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] perf top -> annotate broken; bisected to 69aad6f1 2011-01-11 17:11 ` Arnaldo Carvalho de Melo @ 2011-01-11 17:23 ` Arnaldo Carvalho de Melo 2011-01-11 18:24 ` Kirill Smelkov 0 siblings, 1 reply; 4+ messages in thread From: Arnaldo Carvalho de Melo @ 2011-01-11 17:23 UTC (permalink / raw) To: Kirill Smelkov Cc: Frederic Weisbecker, Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian, Tom Zanussi, linux-kernel Em Tue, Jan 11, 2011 at 03:11:24PM -0200, Arnaldo Carvalho de Melo escreveu: > Em Tue, Jan 11, 2011 at 07:35:20PM +0300, Kirill Smelkov escreveu: > > Hello up there, > > > > Since 69aad6f1ee69546dea8535ab8f3da9f445d57328 (perf tools: Introduce > > event selectors; Jan 3 2011) annotating a symbol in perf top segfaults: > > > > Program received signal SIGSEGV, Segmentation fault. > > [Switching to Thread 0xb714cb90 (LWP 4662)] > > event_name (evsel=0x0) at util/parse-events.c:274 > > 274 return __event_name(type, config); > > (gdb) bt > > #0 event_name (evsel=0x0) at util/parse-events.c:274 > > #1 0x0805f892 in display_thread (arg=0x9422448) at builtin-top.c:359 > > #2 0xb77234c0 in start_thread () from /lib/i686/cmov/libpthread.so.0 > > #3 0xb732b84e in clone () from /lib/i686/cmov/libc.so.6 > > > > > > It used to work... > > Thanks for the report, working on a fix. Done, please test it and I'll add a Tested-by: you tag. Thanks, - Arnaldo commit 347ad46af282994524510d62a4c70455929b6a9d Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue Jan 11 15:16:52 2011 -0200 perf top: Fix annotate segv Before we had sym_counter, it was initialized to zero and we used that as an index in the global attrs variable, now we have a list of evsel entries, and sym_counter became sym_evsel, that remained initialized to zero (NULL): b00m. Fix it by initializing it to the first entry in the evsel list. Bug-introduced: 69aad6f Reported-by: Kirill Smelkov <kirr@mns.spb.ru> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Kirill Smelkov <kirr@mns.spb.ru> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 4b995ee..568b195 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1473,6 +1473,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) pos->attr.sample_period = default_interval; } + sym_evsel = list_entry(evsel_list.next, struct perf_evsel, node); + symbol_conf.priv_size = (sizeof(struct sym_entry) + (nr_counters + 1) * sizeof(unsigned long)); ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [BUG] perf top -> annotate broken; bisected to 69aad6f1 2011-01-11 17:23 ` Arnaldo Carvalho de Melo @ 2011-01-11 18:24 ` Kirill Smelkov 0 siblings, 0 replies; 4+ messages in thread From: Kirill Smelkov @ 2011-01-11 18:24 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker, Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian, Tom Zanussi, linux-kernel On Tue, Jan 11, 2011 at 03:23:10PM -0200, Arnaldo Carvalho de Melo wrote: > Em Tue, Jan 11, 2011 at 03:11:24PM -0200, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Jan 11, 2011 at 07:35:20PM +0300, Kirill Smelkov escreveu: > > > Hello up there, > > > > > > Since 69aad6f1ee69546dea8535ab8f3da9f445d57328 (perf tools: Introduce > > > event selectors; Jan 3 2011) annotating a symbol in perf top segfaults: > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > [Switching to Thread 0xb714cb90 (LWP 4662)] > > > event_name (evsel=0x0) at util/parse-events.c:274 > > > 274 return __event_name(type, config); > > > (gdb) bt > > > #0 event_name (evsel=0x0) at util/parse-events.c:274 > > > #1 0x0805f892 in display_thread (arg=0x9422448) at builtin-top.c:359 > > > #2 0xb77234c0 in start_thread () from /lib/i686/cmov/libpthread.so.0 > > > #3 0xb732b84e in clone () from /lib/i686/cmov/libc.so.6 > > > > > > > > > It used to work... > > > > Thanks for the report, working on a fix. > > Done, please test it and I'll add a Tested-by: you tag. > > Thanks, > > - Arnaldo > > commit 347ad46af282994524510d62a4c70455929b6a9d > Author: Arnaldo Carvalho de Melo <acme@redhat.com> > Date: Tue Jan 11 15:16:52 2011 -0200 > > perf top: Fix annotate segv > > Before we had sym_counter, it was initialized to zero and we used that > as an index in the global attrs variable, now we have a list of evsel > entries, and sym_counter became sym_evsel, that remained initialized to > zero (NULL): b00m. > > Fix it by initializing it to the first entry in the evsel list. > > Bug-introduced: 69aad6f > Reported-by: Kirill Smelkov <kirr@mns.spb.ru> > Cc: Frederic Weisbecker <fweisbec@gmail.com> > Cc: Ingo Molnar <mingo@elte.hu> > Cc: Kirill Smelkov <kirr@mns.spb.ru> > Cc: Mike Galbraith <efault@gmx.de> > Cc: Paul Mackerras <paulus@samba.org> > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: Stephane Eranian <eranian@google.com> > Cc: Tom Zanussi <tzanussi@gmail.com> > LKML-Reference: <new-submission> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c > index 4b995ee..568b195 100644 > --- a/tools/perf/builtin-top.c > +++ b/tools/perf/builtin-top.c > @@ -1473,6 +1473,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) > pos->attr.sample_period = default_interval; > } > > + sym_evsel = list_entry(evsel_list.next, struct perf_evsel, node); > + > symbol_conf.priv_size = (sizeof(struct sym_entry) + > (nr_counters + 1) * sizeof(unsigned long)); Now it works again, thanks! Tested-by: Kirill Smelkov <kirr@mns.spb.ru> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-11 18:23 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-01-11 16:35 [BUG] perf top -> annotate broken; bisected to 69aad6f1 Kirill Smelkov 2011-01-11 17:11 ` Arnaldo Carvalho de Melo 2011-01-11 17:23 ` Arnaldo Carvalho de Melo 2011-01-11 18:24 ` Kirill Smelkov
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.