lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3505011.Hj28Kr4O0A@agathebauer>
Date:   Thu, 18 May 2017 14:13:52 +0200
From:   Milian Wolff <milian.wolff@...b.com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        David Ahern <dsahern@...il.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Yao Jin <yao.jin@...ux.intel.com>, kernel-team@....com
Subject: Re: [PATCH v2] perf report: do not drop last inlined frame

On Donnerstag, 18. Mai 2017 11:55:38 CEST Namhyung Kim wrote:
> On Thu, May 18, 2017 at 10:38:22AM +0200, Milian Wolff wrote:
> > The very last inlined frame, i.e. the one furthest away from the
> > non-inlined frame, was silently dropped. This is apparent when
> > comparing the output of `perf script` and `addr2line`:
> > 
> > ~~~~~~
> > $ perf script --inline
> > ...
> > 
> > a.out 26722 80836.309329:      72425 cycles:
> >                    21493 __hypot_finite (/usr/lib/libm-2.25.so)
> >                    
> >                      a4a std::abs<double> (inline) (/tmp/a.out)
> >                      a4a std::_Norm_helper<true>::_S_do_it<double>
> >                      (inline) (/tmp/a.out)
> >                      a4a std::norm<double> (inline) (/tmp/a.out)
> >                      a4a main (/tmp/a.out)
> >                    
> >                    20510 __libc_start_main (/usr/lib/libc-2.25.so)
> >                    
> >                      bd9 _start (/tmp/a.out)
> > 
> > $ addr2line -a -f -i -e /tmp/a.out a4a | c++filt
> > 0x0000000000000a4a
> > std::__complex_abs(doublecomplex )
> > /usr/include/c++/6.3.1/complex:589
> > double std::abs<double>(std::complex<double> const&)
> > /usr/include/c++/6.3.1/complex:597
> > double std::_Norm_helper<true>::_S_do_it<double>(std::complex<double>
> > const&) /usr/include/c++/6.3.1/complex:654
> > double std::norm<double>(std::complex<double> const&)
> > /usr/include/c++/6.3.1/complex:664
> > main
> > /tmp/inlining.cpp:14
> > ~~~~~
> > 
> > Note how `std::__complex_abs` is missing from the `perf script`
> > output. This is similarly showing up in `perf report`. The patch
> > here fixes this issue, and the output becomes:
> > 
> > ~~~~~
> > 
> > a.out 26722 80836.309329:      72425 cycles:
> >                    21493 __hypot_finite (/usr/lib/libm-2.25.so)
> >                    
> >                     ace3 hypot (/usr/lib/libm-2.25.so)
> 
> Why is the 'hypot' missing in the above perf script output?  Is it
> another problem?

Uhm, good question. I fear I messed up by testing this with other patches 
applied in the background. I just tested this in a stand-alone manner and I 
cannot reproduce this issue. The script output is different, too (based on 
your original patch). I'll update the commit message and send v3.

Before:

                   21561 __hypot_finite (/usr/lib/libm-2.25.so)
                    ace3 hypot (/usr/lib/libm-2.25.so)
                     a4a main (/home/milian/projects/src/perf-tests/inlining)
                         std::abs<double>
                         std::_Norm_helper<true>::_S_do_it<double>
                         std::norm<double>
                         main
                   20510 __libc_start_main (/usr/lib/libc-2.25.so)
                     bd9 _start (/home/milian/projects/src/perf-tests/
inlining)

After:
                   21561 __hypot_finite (/usr/lib/libm-2.25.so)
                    ace3 hypot (/usr/lib/libm-2.25.so)
                     a4a main (/home/milian/projects/src/perf-tests/inlining)
                         std::__complex_abs
                         std::abs<double>
                         std::_Norm_helper<true>::_S_do_it<double>
                         std::norm<double>
                         main
                   20510 __libc_start_main (/usr/lib/libc-2.25.so)
                     bd9 _start (/home/milian/projects/src/perf-tests/
inlining)

Btw, if you wonder why main is twice in there - that's going to be fixed by my 
upcoming patch series to rework inline frames.

Cheers

-- 
Milian Wolff | milian.wolff@...b.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5903 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ