perf symbols: Demangle symbols for synthesized @plt entries.
authorMilian Wolff <milian.wolff@kdab.com>
Tue, 30 Aug 2016 11:41:02 +0000 (13:41 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 1 Sep 2016 12:44:12 +0000 (09:44 -0300)
commit2a8d41b46540f224d77c255b5cc042d145e81b83
tree7655b85a6d7e9278d7fa721cb97e6106d8de8e65
parentfd2275984d6e29c6737646ff39dd3de87a03f300
perf symbols: Demangle symbols for synthesized @plt entries.

The symbols in the synthesized @plt entries where not demangled before,
i.e. we could end up with entries such as:

    $ perf 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% _ZNK6QImage6heightEv@plt
             + 2.14% QColor::rgb
               1.94% _ZNK6QImage5widthEv@plt
               1.92% cabs@plt

This patch remedies this issue by also applying demangling to the
synthesized symbols. The output for the above is now:

    $ perf 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

Signed-off-by: Milian Wolff <milian.wolff@kdab.com>
LPU-Reference: 20160830114102.30863-1-milian.wolff@kdab.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol-elf.c