Skip to contentSkip to conversation

Cost in sym vs. sym@plt

DISCUSSION Milian Wolff 2 participants 3 messages Aug 30, 2016 – Sep 3, 2016

lore
Share & tools
lore
#0 lore raw

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

Signature · 4 lines
Milian Wolff | [email protected] | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
#1 lore raw
Quoted 4 lines · Milian Wolff

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.

There's no such thing as fully accurate profiling.

-Andi

#2 lore raw
Quoted 6 lines · On Mittwoch, 31. August 2016 09:51:06 CEST Andi Kleen wrote:
Quoted 3 lines · Milian Wolff

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.

There's no such thing as fully accurate profiling.

OK, so does this mean it's skid that I'm seeing here?

Thanks

Signature · 4 lines
Milian Wolff | [email protected] | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts