linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: namhyung@kernel.org
Cc: shiny.sebastian@intel.com, linux-perf-users@vger.kernel.org
Subject: Re: Perf report --percentage
Date: Mon, 13 Jun 2016 13:01:36 +0200	[thread overview]
Message-ID: <1492589.8RtTsSktH8@agathebauer> (raw)
In-Reply-To: <20160612135526.GA16671@danjae.aot.lge.com>

[-- Attachment #1: Type: text/plain, Size: 3397 bytes --]

On Sonntag, 12. Juni 2016 22:55:26 CEST Namhyung Kim wrote:
> Hi Milian,
> 
> On Sat, Jun 11, 2016 at 01:53:34PM +0200, Milian Wolff wrote:
> > On Samstag, 11. Juni 2016 17:31:48 CEST Namhyung Kim wrote:
> > > Hello,
> > > 
> > > On Wed, Jun 08, 2016 at 04:21:43PM +0000, Sebastian, Shiny wrote:
> > > > Thanks Milian. I added -g graph,0 and it did add lot more percentages
> > > > -
> > > > it's still not adding up though.
> > > > 
> > > > #perf report -C 1 --no-children -g graph,0
> > > 
> > > I think it's because you used -C option to restrict samples only from
> > > cpu 1.  One way to check this is adding 'cpu' to sort keys and compare
> > > sample count and callchain count.
> > > 
> > > What is the result of this command?
> > > 
> > >   # perf report -C 1 --no-children -g graph,0,count -n -s +cpu
> > 
> > If that is the case, how would you explain my findings? Note how I did not
> > pass `-C 1`, and still missed up to 90% of backtraces:
> > 
> > $ perf report --no-children -g fractal,0
> > 
> > -    9.47%  kwrite           ld-2.23.so                     [.]
> > do_lookup_x
> > 
> >    + 23.31% do_lookup_x
> > 
> > -    7.06%  kwrite           ld-2.23.so                     [.] strcmp
> > 
> >    + 9.06% strcmp
> > 
> > +    5.71%  kwrite           ld-2.23.so                     [.]
> > check_match
> 
> Hmm.. I have no idea.  Could you please show me the count of
> callchains with following command?
> 
>   $ perf report --no-children -g graph,0,count -n

-   12.43%           252  kwrite           ld-2.23.so                     [.]
do_lookup_x
     51 do_lookup_x
      + _dl_lookup_symbol_x
-   10.46%           223  kwrite           ld-2.23.so                     [.] 
strcmp
   + 37 strcmp
-    8.66%           175  kwrite           ld-2.23.so                     [.] 
check_match
     44 check_match
        do_lookup_x
      + _dl_lookup_symbol_x

Note that I could not reproduce that on a different machine of mine.

> Also it'd be great if you double check the output of 'perf script' to
> ensure all the samples have callchains..

Quite a few samples don't have callchains:

kwrite 14838 31462.912726:     222759 cycles:u: 

kwrite 14838 31462.913158:     207623 cycles:u: 

kwrite 14838 31462.913428:     196656 cycles:u: 

kwrite 14838 31462.913532:     194832 cycles:u: 

kwrite 14838 31462.913714:     229283 cycles:u: 

kwrite 14838 31462.913895:     239871 cycles:u: 

kwrite 14838 31462.914303:     234688 cycles:u: 

kwrite 14838 31462.914384:     223273 cycles:u: 

kwrite 14838 31462.914533:     281279 cycles:u: 

So this quite possibly is the issue in my case.

Could we improve `perf report` to show a "<no stack>" entry or similar? I.e. 
something like this:

-   12.43%           252  kwrite           ld-2.23.so                     [.]
do_lookup_x
     51 do_lookup_x
      + _dl_lookup_symbol_x
    201 <no stack>
-   10.46%           223  kwrite           ld-2.23.so                     [.] 
strcmp
   + 37 strcmp
    186 <no stack>
-    8.66%           175  kwrite           ld-2.23.so                     [.] 
check_match
     44 check_match
        do_lookup_x
      + _dl_lookup_symbol_x
    131 <no stack>

I'll have a look at implementing that. Should be simple enough, I hope.

Bye
-- 
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]

  reply	other threads:[~2016-06-13 11:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 19:21 Perf report --percentage Sebastian, Shiny
2016-06-08  7:34 ` Milian Wolff
2016-06-08 16:21   ` Sebastian, Shiny
2016-06-11  8:31     ` Namhyung Kim
2016-06-11 11:53       ` Milian Wolff
2016-06-12 13:55         ` Namhyung Kim
2016-06-13 11:01           ` Milian Wolff [this message]
2016-06-09 15:13   ` Arnaldo Carvalho de Melo
2016-06-10  3:14     ` Namhyung Kim

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=1492589.8RtTsSktH8@agathebauer \
    --to=milian.wolff@kdab.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=shiny.sebastian@intel.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).