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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170324190119.GE5148@kernel.org>
Date:   Fri, 24 Mar 2017 16:01:19 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Milian Wolff <milian.wolff@...b.com>
Cc:     Jin Yao <yao.jin@...ux.intel.com>, jolsa@...nel.org,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v5 0/5] perf report: Show inline stack

Em Sat, Mar 18, 2017 at 05:41:09PM +0100, Milian Wolff escreveu:
> On Donnerstag, 16. März 2017 22:42:22 CET Jin Yao wrote:
> > v5: Update according to Milian Wolff's comments. It groups by address
> >     (then display file/ line), or by function (then display function name).
> 
> Thank you Jin, that is really good. I tested it and it works really well for 
> me.
> 
> Arnaldo, could you please consider merging this? It's an extremely useful 
> feature and direly missing from perf so far.

Thanks, applied.
 
> That said, Jin, here are some observations that could be improved in the 
> future (I don't think any of these should hold back merging this feature now):
> 
> For the following example code build with "-O2 -g" and recorded with "--call-
> graph dwarf" I observe some output combinations that could potentially be 
> improved in the future:
> 
> ~~~~~~~~~~~~~~~~~~~~
> #include <complex>
> #include <cmath>
> #include <random>
> #include <iostream>
> 
> using namespace std;
> 
> int main()
> {
>     uniform_real_distribution<double> uniform(-1E5, 1E5);
>     default_random_engine engine;
>     double s = 0;
>     for (int i = 0; i < 10000000; ++i) {
>         s += norm(complex<double>(uniform(engine), uniform(engine)));
>     }
>     cout << s << '\n';
>     return 0;
> }
> ~~~~~~~~~~~~~~~~
> 
> #1 duplicated entries when grouping by function:
> 
> ~~~~~~~~~~~~~~~~
> perf report --inline --stdio
> ...
>              --35.34%--_start
>                        __libc_start_main
>                        main
>                        main (inline)
>                        std::uniform_real_distribution<double>::operator()<std::linear_congruential_engine<unsigned 
> long, 16807ul, 0ul, 2147483647ul> > (inline)
>                        std::uniform_real_distribution<double>::operator()<std::linear_congruential_engine<unsigned 
> long, 16807ul, 0ul, 2147483647ul> > (inline)
>                        std::__detail::_Adaptor<std::linear_congruential_engine<unsigned 
> long, 16807ul, 0ul, 2147483647ul>, double>::operator() (inline)
> ~~~~~~~~~~~~~~~~
> 
> Here, we see main twice, once for the "real" frame, and once for an inlined 
> one? Then we see the same function twice as inlined frame, which is also odd.
> 
> ~~~~~~~~~~~~~~~~
> perf report --inline --stdio --no-children
> ...
>     59.81%  cpp-inlining  libm-2.25.so      [.] __hypot_finite
>             |
>             ---__hypot_finite
>                hypot
>                main
>                std::norm<double> (inline)
>                main (inline)
>                __libc_start_main
>                _start
> ~~~~~~~~~~~~~~~~
> 
> Here we see a confusing output. The first "main" frame below "hypot" is 
> actually code form cpp's complex header which got inlined into main. That 
> associates the wrong function name to this frame, i.e. "main" instead of 
> std::norm". When the inline stack is shown below we actually see what happens, 
> i.e. we eventually end up in main again, but of course this output is not the 
> best as-is.
> 
> But, again: I think these are minor issues, and the feature itself is already 
> extremely useful and I hope to see it finally merged.
> 
> Thanks again Jin for your good work!
> 
> 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ