Linux Perf Users
 help / color / mirror / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: linux-perf-users@vger.kernel.org
Subject: Cost in sym vs. sym@plt
Date: Tue, 30 Aug 2016 13:54:53 +0200	[thread overview]
Message-ID: <2472727.a3qg7mcsuX@milian-kdab2> (raw)

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

Hey all,

in one of my perf data, I see the following cost report:

    Samples: 7K of event 'cycles:ppp', Event count (approx.): 6223833141
    Children      Self  Command          Shared Object           Symbol
    -   93.63%    28.89%  lab_mandelbrot   lab_mandelbrot        [.] main
        - 73.81% main
            - 33.57% hypot
              27.76% __hypot_finite
              15.97% __muldc3
               2.90% __muldc3@plt
               2.40% QImage::height() const@plt
             + 2.14% QColor::rgb
               1.94% QImage::width() const@plt
               1.92% cabs@plt

How do I interpret the @plt cost? Does this really mean that 2.90% + 2.40% + 
1.94% + 1.92% + ... of time is spent in the @plt stubs, which then call the 
"real" non-@plt functions?

I'm asking, because I did not expect the cost of the @plt to be that large. Is 
this maybe due to skid? I doubt that, since the above is from a cycles:ppp 
profile on an Intel Haswell i5, which is supposedly accurate.

If on the other hand the @plt actually calls the real function opaquely 
internally, then I would propose to merge the two symbols in perf reports (at 
least optionally). From my POV of an application developer, the distinction 
between sym and sym@plt is just adding noise, the real cost for me is the sum 
of the two entries.

Any explanation on how to interpret the data would be appreciated.

Thanks
-- 
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-08-30 11:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30 11:54 Milian Wolff [this message]
2016-08-31 16:51 ` Cost in sym vs. sym@plt Andi Kleen
2016-09-03 20:40   ` Milian Wolff

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=2472727.a3qg7mcsuX@milian-kdab2 \
    --to=milian.wolff@kdab.com \
    --cc=linux-perf-users@vger.kernel.org \
    /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