linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Milian Wolff <milian.wolff@kdab.com>
Cc: perf group <linux-perf-users@vger.kernel.org>
Subject: Re: perf trace report with time consumed
Date: Wed, 30 Mar 2016 18:58:33 -0300	[thread overview]
Message-ID: <20160330215832.GG3420@kernel.org> (raw)
In-Reply-To: <4785655.UdtHu7qvlx@agathebauer>

Em Wed, Mar 30, 2016 at 11:24:17PM +0200, Milian Wolff escreveu:
> On Mittwoch, 30. März 2016 11:53:14 CEST Arnaldo Carvalho de Melo wrote:
> > Em Tue, Mar 29, 2016 at 10:39:36PM +0200, Milian Wolff escreveu:
> > > with "perf trace record --call-graph dwarf" I get a nice data file with
> > > potentially everything required to find slow syscalls in user space
> > > applications. But I'm missing a way to rewrite the data file to let "perf
> > > report" attribute samples with the time spent as cost, instead of the raw
> > > number of syscalls, i.e. samples.

<SNIP>

> > There is even:
> > 
> > [root@jouet ~]# trace --duration 1000 -i perf.data
> >   1000.423 (1000.056 ms): sleep/1139 nanosleep(rqtp: 0x7ffebed266c0) = 0
> > [root@jouet ~]#
> > 
> > Having that with callgraph from userspace is what you're asking for, no?
> > 
> > 'trace' here is just an alias for 'perf trace'.
> 
> Yep, I think having the individual trace entries annotated with their 
> backtrace would be a useful addition and also brings perf trace closer to 
> strace, cf. it's -k option.

Humm, I was unaware of that:

       -k          Print the execution stack trace of the traced
		   processes after each system call (experimental).
		   This option is available only if strace is built with
		   libunwind.

Which is not the case in fedora23 :-\

> But I still think that this would be useful to have as well:
> 
> > > Is this functionality there already? Or do I have to write another "perf
> > > inject" command, similar to "perf inject --sched-stat"?
> 
> That would allow one to browse the aggregated call stacks in bottom-up/top-
> down manner with `perf report`. `perf trace` allows the aggregation by syscall 
> via `--summary`, but I don't see a good way to add a call stacks visualization 
> there in any decent way. `perf inject` + `perf report` could solve that 
> nicely, no?

Probably, try it :-)

- Arnaldo

  reply	other threads:[~2016-03-30 21:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 20:39 perf trace report with time consumed Milian Wolff
2016-03-30 14:53 ` Arnaldo Carvalho de Melo
2016-03-30 21:24   ` Milian Wolff
2016-03-30 21:58     ` Arnaldo Carvalho de Melo [this message]
2016-03-31 22:34       ` Milian Wolff
2016-04-01 13:01         ` Arnaldo Carvalho de Melo
2016-04-03 16:30           ` Jiri Olsa
2016-04-03 18:46         ` Milian Wolff
2016-04-04  6:14           ` Jiri Olsa
2016-04-04 21:17             ` Milian Wolff
2016-04-05  8:35               ` Jiri Olsa
2016-04-06 15:46                 ` [PATCH] perf tools: Add dedicated unwind addr_space member into thread struct Jiri Olsa
2016-04-06 21:15                   ` Milian Wolff
2016-04-08 12:58                     ` Arnaldo Carvalho de Melo
2016-04-06 21:16                 ` perf trace report with time consumed Milian Wolff
2016-04-08 13:01                   ` Arnaldo Carvalho de Melo

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=20160330215832.GG3420@kernel.org \
    --to=acme@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=milian.wolff@kdab.com \
    /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;
as well as URLs for NNTP newsgroup(s).