* Does perf inject preserve call chain data? @ 2012-05-22 18:49 Tim Chen 2012-05-22 21:58 ` David Ahern 0 siblings, 1 reply; 14+ messages in thread From: Tim Chen @ 2012-05-22 18:49 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, "; ak" Arnaldo, Wonder if perf inject munged the call chain data from perf record? When I do perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - I get a complain from perf report Warning: Selected -g but no callchain data. Did you call 'perf record' without -g? Thanks. Tim ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-05-22 18:49 Does perf inject preserve call chain data? Tim Chen @ 2012-05-22 21:58 ` David Ahern 2012-06-08 14:38 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 14+ messages in thread From: David Ahern @ 2012-05-22 21:58 UTC (permalink / raw) To: Tim Chen; +Cc: Arnaldo Carvalho de Melo, linux-kernel, ak, Stephane Eranian On 5/22/12 12:49 PM, Tim Chen wrote: > Arnaldo, > > Wonder if perf inject munged the call chain data from perf record? > > When I do > perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - > I get a complain from perf report > > Warning: > Selected -g but no callchain data. Did you call 'perf record' without -g? > I believe the root cause is that the event list is not written to the pipe. Using Arnaldo's git repo as of today (has fixes from Stephane) this hack shows the info is there and can be processed. diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index d58e414..60f3f17 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -256,7 +257,7 @@ static int perf_report__setup_sample_type(struct perf_report *rep) "'perf record' without -g?\n"); return -EINVAL; } - if (symbol_conf.use_callchain) { + if (!self->fd_pipe && symbol_conf.use_callchain) { ui__warning("Selected -g but no callchain data. Did " "you call 'perf record' without -g?\n"); return -1; A proper solution is needed. David ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-05-22 21:58 ` David Ahern @ 2012-06-08 14:38 ` Arnaldo Carvalho de Melo 2012-06-08 16:44 ` Tim Chen 0 siblings, 1 reply; 14+ messages in thread From: Arnaldo Carvalho de Melo @ 2012-06-08 14:38 UTC (permalink / raw) To: David Ahern; +Cc: Tim Chen, linux-kernel, ak, Stephane Eranian Em Tue, May 22, 2012 at 03:58:40PM -0600, David Ahern escreveu: > On 5/22/12 12:49 PM, Tim Chen wrote: > >Arnaldo, > > > >Wonder if perf inject munged the call chain data from perf record? > > > >When I do > >perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - > >I get a complain from perf report > > > >Warning: > >Selected -g but no callchain data. Did you call 'perf record' without -g? > > > > I believe the root cause is that the event list is not written to > the pipe. Using Arnaldo's git repo as of today (has fixes from > Stephane) this hack shows the info is there and can be processed. How things stand here? Tim, did this fix things for you? If so, David, please resend with a proper subject line and a Tested-by: Tim, ok? Thanks, - Arnaldo > > diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c > index d58e414..60f3f17 100644 > --- a/tools/perf/builtin-report.c > +++ b/tools/perf/builtin-report.c > @@ -256,7 +257,7 @@ static int perf_report__setup_sample_type(struct > perf_report *rep) > "'perf record' without -g?\n"); > return -EINVAL; > } > - if (symbol_conf.use_callchain) { > + if (!self->fd_pipe && symbol_conf.use_callchain) { > ui__warning("Selected -g but no callchain data. Did " > "you call 'perf record' without -g?\n"); > return -1; > > A proper solution is needed. > > David ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-08 14:38 ` Arnaldo Carvalho de Melo @ 2012-06-08 16:44 ` Tim Chen 2012-06-08 17:13 ` David Ahern 0 siblings, 1 reply; 14+ messages in thread From: Tim Chen @ 2012-06-08 16:44 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: David Ahern, linux-kernel, ak, Stephane Eranian On Fri, 2012-06-08 at 11:38 -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, May 22, 2012 at 03:58:40PM -0600, David Ahern escreveu: > > On 5/22/12 12:49 PM, Tim Chen wrote: > > >Arnaldo, > > > > > >Wonder if perf inject munged the call chain data from perf record? > > > > > >When I do > > >perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - > > >I get a complain from perf report > > > > > >Warning: > > >Selected -g but no callchain data. Did you call 'perf record' without -g? > > > > > > > I believe the root cause is that the event list is not written to > > the pipe. Using Arnaldo's git repo as of today (has fixes from > > Stephane) this hack shows the info is there and can be processed. > > How things stand here? Tim, did this fix things for you? If so, David, > please resend with a proper subject line and a Tested-by: Tim, ok? > > Thanks, > > - Arnaldo > It didn't fix things for me when I was testing on a westmere-ex machine. I got # ./perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - incompatible file format incompatible file formatincompatible file formatselected -g but no callchain data. Did you call perf record without -g? Testing was done on 3.5.0-rc1. Tim > > > > diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c > > index d58e414..60f3f17 100644 > > --- a/tools/perf/builtin-report.c > > +++ b/tools/perf/builtin-report.c > > @@ -256,7 +257,7 @@ static int perf_report__setup_sample_type(struct > > perf_report *rep) > > "'perf record' without -g?\n"); > > return -EINVAL; > > } > > - if (symbol_conf.use_callchain) { > > + if (!self->fd_pipe && symbol_conf.use_callchain) { > > ui__warning("Selected -g but no callchain data. Did " > > "you call 'perf record' without -g?\n"); > > return -1; > > > > A proper solution is needed. > > > > David ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-08 16:44 ` Tim Chen @ 2012-06-08 17:13 ` David Ahern 2012-06-08 17:17 ` Tim Chen 0 siblings, 1 reply; 14+ messages in thread From: David Ahern @ 2012-06-08 17:13 UTC (permalink / raw) To: Tim Chen; +Cc: Arnaldo Carvalho de Melo, linux-kernel, ak, Stephane Eranian On 6/8/12 10:44 AM, Tim Chen wrote: > On Fri, 2012-06-08 at 11:38 -0300, Arnaldo Carvalho de Melo wrote: >> Em Tue, May 22, 2012 at 03:58:40PM -0600, David Ahern escreveu: >>> On 5/22/12 12:49 PM, Tim Chen wrote: >>>> Arnaldo, >>>> >>>> Wonder if perf inject munged the call chain data from perf record? >>>> >>>> When I do >>>> perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - >>>> I get a complain from perf report >>>> >>>> Warning: >>>> Selected -g but no callchain data. Did you call 'perf record' without -g? >>>> >>> >>> I believe the root cause is that the event list is not written to >>> the pipe. Using Arnaldo's git repo as of today (has fixes from >>> Stephane) this hack shows the info is there and can be processed. >> >> How things stand here? Tim, did this fix things for you? If so, David, >> please resend with a proper subject line and a Tested-by: Tim, ok? >> >> Thanks, >> >> - Arnaldo >> > > It didn't fix things for me when I was testing on a westmere-ex machine. > I got > > # ./perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - > incompatible file format > incompatible file formatincompatible file formatselected -g but no callchain data. Did you call perf record without -g? > > Testing was done on 3.5.0-rc1. Is ./ needed in front of the second and third invocations are do you have ./ in the PATH? David ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-08 17:13 ` David Ahern @ 2012-06-08 17:17 ` Tim Chen 2012-06-08 19:52 ` Andi Kleen 2012-06-11 18:23 ` David Ahern 0 siblings, 2 replies; 14+ messages in thread From: Tim Chen @ 2012-06-08 17:17 UTC (permalink / raw) To: David Ahern; +Cc: Arnaldo Carvalho de Melo, linux-kernel, ak, Stephane Eranian On Fri, 2012-06-08 at 11:13 -0600, David Ahern wrote: > On 6/8/12 10:44 AM, Tim Chen wrote: > > On Fri, 2012-06-08 at 11:38 -0300, Arnaldo Carvalho de Melo wrote: > >> Em Tue, May 22, 2012 at 03:58:40PM -0600, David Ahern escreveu: > >>> On 5/22/12 12:49 PM, Tim Chen wrote: > >>>> Arnaldo, > >>>> > >>>> Wonder if perf inject munged the call chain data from perf record? > >>>> > >>>> When I do > >>>> perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - > >>>> I get a complain from perf report > >>>> > >>>> Warning: > >>>> Selected -g but no callchain data. Did you call 'perf record' without -g? > >>>> > >>> > >>> I believe the root cause is that the event list is not written to > >>> the pipe. Using Arnaldo's git repo as of today (has fixes from > >>> Stephane) this hack shows the info is there and can be processed. > >> > >> How things stand here? Tim, did this fix things for you? If so, David, > >> please resend with a proper subject line and a Tested-by: Tim, ok? > >> > >> Thanks, > >> > >> - Arnaldo > >> > > > > It didn't fix things for me when I was testing on a westmere-ex machine. > > I got > > > > # ./perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - > > incompatible file format > > incompatible file formatincompatible file formatselected -g but no callchain data. Did you call perf record without -g? > > > > Testing was done on 3.5.0-rc1. > > Is ./ needed in front of the second and third invocations are do you > have ./ in the PATH? > > David Thanks for catching my dumb mistake. Things work properly now. Tim ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-08 17:17 ` Tim Chen @ 2012-06-08 19:52 ` Andi Kleen 2012-06-09 16:05 ` Arnaldo Carvalho de Melo 2012-06-11 18:23 ` David Ahern 1 sibling, 1 reply; 14+ messages in thread From: Andi Kleen @ 2012-06-08 19:52 UTC (permalink / raw) To: Tim Chen Cc: David Ahern, Arnaldo Carvalho de Melo, linux-kernel, Stephane Eranian > > > > > > # ./perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - Since this is a common pattern with files, but files are often slow and too big, it would be nice if perf had a standard alias that started this pipeline. -Andi -- ak@linux.intel.com -- Speaking for myself only ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-08 19:52 ` Andi Kleen @ 2012-06-09 16:05 ` Arnaldo Carvalho de Melo 2012-06-11 18:43 ` Andi Kleen 0 siblings, 1 reply; 14+ messages in thread From: Arnaldo Carvalho de Melo @ 2012-06-09 16:05 UTC (permalink / raw) To: Andi Kleen; +Cc: Tim Chen, David Ahern, linux-kernel, Stephane Eranian Em Fri, Jun 08, 2012 at 12:52:15PM -0700, Andi Kleen escreveu: > > > > # ./perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - > Since this is a common pattern with files, but files are often slow > and too big, it would be nice if perf had a standard alias that > started this pipeline. I think this is just a variation for perf top, no? I.e. something like: # perf top -a -G sleep 5 Where it would figure out that since a workload was specified, it should just not be refreshing the screen every N seconds but wait till the workload to finish and then present the results, without setting up any perf.data files. It could as well show intermediate results every N seconds, but not decay the older samples, which should be even nicer. For workloads where there is output it could spawn another term, in the background perhaps, that the user could switch to to see the samples collected while the workload runs. That looks like a step in the direction of more integration of the tools, i.e. record + report (top being report+refreshes) + annotate. - Arnaldo ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-09 16:05 ` Arnaldo Carvalho de Melo @ 2012-06-11 18:43 ` Andi Kleen 2012-06-11 19:11 ` David Ahern 2012-06-11 21:59 ` Arnaldo Carvalho de Melo 0 siblings, 2 replies; 14+ messages in thread From: Andi Kleen @ 2012-06-11 18:43 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Tim Chen, David Ahern, linux-kernel, Stephane Eranian > # perf top -a -G sleep 5 > > Where it would figure out that since a workload was specified, it should > just not be refreshing the screen every N seconds but wait till the > workload to finish and then present the results, without setting up any > perf.data files. But top does not generate email'able ASCII format like perf report does, doesn't it? -Andi ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-11 18:43 ` Andi Kleen @ 2012-06-11 19:11 ` David Ahern 2012-06-11 21:59 ` Arnaldo Carvalho de Melo 1 sibling, 0 replies; 14+ messages in thread From: David Ahern @ 2012-06-11 19:11 UTC (permalink / raw) To: Andi Kleen Cc: Arnaldo Carvalho de Melo, Tim Chen, linux-kernel, Stephane Eranian On 6/11/12 12:43 PM, Andi Kleen wrote: > > >> # perf top -a -G sleep 5 >> >> Where it would figure out that since a workload was specified, it should >> just not be refreshing the screen every N seconds but wait till the >> workload to finish and then present the results, without setting up any >> perf.data files. > > But top does not generate email'able ASCII format like perf report does, > doesn't it? perf top --stdio ... ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-11 18:43 ` Andi Kleen 2012-06-11 19:11 ` David Ahern @ 2012-06-11 21:59 ` Arnaldo Carvalho de Melo 2012-06-11 22:11 ` Andi Kleen 1 sibling, 1 reply; 14+ messages in thread From: Arnaldo Carvalho de Melo @ 2012-06-11 21:59 UTC (permalink / raw) To: Andi Kleen; +Cc: Tim Chen, David Ahern, linux-kernel, Stephane Eranian Em Mon, Jun 11, 2012 at 11:43:30AM -0700, Andi Kleen escreveu: > ># perf top -a -G sleep 5 > > > >Where it would figure out that since a workload was specified, it should > >just not be refreshing the screen every N seconds but wait till the > >workload to finish and then present the results, without setting up any > >perf.data files. > > But top does not generate email'able ASCII format like perf report > does, doesn't it? http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=commit;h=a78e5b82e99d8d284afc012ef015ef3332153aaf perf hists browser: Implement printing snapshots to files To avoid having to resort to --stdio, that expands everything, instead allow the user to go on expanding the relevant callchains and then press 'P' to print that view. As the hists browser is used for both static (report) and dynamic (top) views, it prints to a 'perf.hists.N' sequence, i.e. multiple snapshots can be taken in report and top. </> On a v3.6 kernel near you, together with: http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=commit;h=bd622d64e4bb0d10e8f0c2df4de9303ee415ffae :-) - Arnaldo ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-11 21:59 ` Arnaldo Carvalho de Melo @ 2012-06-11 22:11 ` Andi Kleen 2012-06-12 0:02 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 14+ messages in thread From: Andi Kleen @ 2012-06-11 22:11 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Tim Chen, David Ahern, linux-kernel, Stephane Eranian > http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=commit;h=a78e5b82e99d8d284afc012ef015ef3332153aaf Thanks. That would work I suppose. I think I would still prefer a single command over a bunch of options, but having options is not too bad. -Andi ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-11 22:11 ` Andi Kleen @ 2012-06-12 0:02 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 14+ messages in thread From: Arnaldo Carvalho de Melo @ 2012-06-12 0:02 UTC (permalink / raw) To: Andi Kleen; +Cc: Tim Chen, David Ahern, linux-kernel, Stephane Eranian Em Mon, Jun 11, 2012 at 03:11:35PM -0700, Andi Kleen escreveu: > >http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=commit;h=a78e5b82e99d8d284afc012ef015ef3332153aaf > > Thanks. That would work I suppose. I think I would still prefer a single > command over a bunch of options, but having options is not too bad. Not a bunch, just one option. And only if you feel like, at that point in time, to snapshot it to send it over e-mail. - Arnaldo ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Does perf inject preserve call chain data? 2012-06-08 17:17 ` Tim Chen 2012-06-08 19:52 ` Andi Kleen @ 2012-06-11 18:23 ` David Ahern 1 sibling, 0 replies; 14+ messages in thread From: David Ahern @ 2012-06-11 18:23 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: Tim Chen, linux-kernel, ak, Stephane Eranian On 6/8/12 11:17 AM, Tim Chen wrote: > On Fri, 2012-06-08 at 11:13 -0600, David Ahern wrote: >> On 6/8/12 10:44 AM, Tim Chen wrote: >>> On Fri, 2012-06-08 at 11:38 -0300, Arnaldo Carvalho de Melo wrote: >>>> Em Tue, May 22, 2012 at 03:58:40PM -0600, David Ahern escreveu: >>>>> On 5/22/12 12:49 PM, Tim Chen wrote: >>>>>> Arnaldo, >>>>>> >>>>>> Wonder if perf inject munged the call chain data from perf record? >>>>>> >>>>>> When I do >>>>>> perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i - >>>>>> I get a complain from perf report >>>>>> >>>>>> Warning: >>>>>> Selected -g but no callchain data. Did you call 'perf record' without -g? >>>>>> >>>>> >>>>> I believe the root cause is that the event list is not written to >>>>> the pipe. Using Arnaldo's git repo as of today (has fixes from >>>>> Stephane) this hack shows the info is there and can be processed. >>>> >>>> How things stand here? Tim, did this fix things for you? If so, David, >>>> please resend with a proper subject line and a Tested-by: Tim, ok? Pipeline is broken by this commit in your urgent (but not yet pushed) tree: commit 47832ad3e101e470a90fab9b4915549aaee03662 Author: Dmitry Antipov <dmitry.antipov@linaro.org> Date: Fri Jun 8 16:23:27 2012 +0400 perf report: Fix event name reporting in cross analysis Use trace_find_event to find event name before looking through /sys files. This helps 'perf report' to show real event names instead of 'unknown:unknown' when processing perf.data recorded on another machine. pevent might be NULL and pevent_find_event dereferences it causing a crash. David ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2012-06-12 0:02 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-22 18:49 Does perf inject preserve call chain data? Tim Chen 2012-05-22 21:58 ` David Ahern 2012-06-08 14:38 ` Arnaldo Carvalho de Melo 2012-06-08 16:44 ` Tim Chen 2012-06-08 17:13 ` David Ahern 2012-06-08 17:17 ` Tim Chen 2012-06-08 19:52 ` Andi Kleen 2012-06-09 16:05 ` Arnaldo Carvalho de Melo 2012-06-11 18:43 ` Andi Kleen 2012-06-11 19:11 ` David Ahern 2012-06-11 21:59 ` Arnaldo Carvalho de Melo 2012-06-11 22:11 ` Andi Kleen 2012-06-12 0:02 ` Arnaldo Carvalho de Melo 2012-06-11 18:23 ` David Ahern
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox