From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jin, Yao" Subject: Re: Feedback on: [RESEND PATCH v2 0/5] perf report: Show inline stack Date: Tue, 10 Jan 2017 09:53:04 +0800 Message-ID: <780b3634-fa42-01f5-4f95-3c571fa4eb84@linux.intel.com> References: <5135140.l86lTS2Zdn@agathebauer> <1741616.SQg6AZICR4@milian-kdab2> <6c7d4609-10c6-de26-3b60-d7bc5720e716@linux.intel.com> <25589337.ZiVbHRJfWF@milian-kdab2> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mga05.intel.com ([192.55.52.43]:1074 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbdAJBxG (ORCPT ); Mon, 9 Jan 2017 20:53:06 -0500 In-Reply-To: <25589337.ZiVbHRJfWF@milian-kdab2> Sender: linux-perf-users-owner@vger.kernel.org List-ID: To: Milian Wolff Cc: linux-perf-users Hi Wolff, I update the patch series with adding inline searching for each callchain entry. Now the result tested on my skl machine is: # Overhead Command Shared Object Symbol # ........ ....... ................... .................................. # 56.76% inline inline [.] main | ---main __libc_start_main _start 40.54% inline libm-2.23.so [.] __hypot_finite | ---__hypot_finite | --40.09%--__hypot | ---/usr/include/c++/5/bits/random.h:151 (inline) /usr/include/c++/5/bits/random.h:332 (inline) /usr/include/c++/5/bits/random.tcc:3328 (inline) /usr/include/c++/5/bits/random.h:185 (inline) /usr/include/c++/5/bits/random.h:1818 (inline) /usr/include/c++/5/bits/random.h:1809 (inline) /home/jinyao/skl-ws/perf-dev/lck-2867/test/inline.cpp:14 (inline) main __libc_start_main _start 1.30% inline libm-2.23.so [.] __hypot | ---__hypot | ---/usr/include/c++/5/bits/random.h:151 (inline) /usr/include/c++/5/bits/random.h:332 (inline) /usr/include/c++/5/bits/random.tcc:3328 (inline) /usr/include/c++/5/bits/random.h:185 (inline) /usr/include/c++/5/bits/random.h:1818 (inline) /usr/include/c++/5/bits/random.h:1809 (inline) /home/jinyao/skl-ws/perf-dev/lck-2867/test/inline.cpp:14 (inline) main __libc_start_main _start Thanks Jin Yao On 1/9/2017 4:41 PM, Milian Wolff wrote: > On Monday, January 9, 2017 4:17:48 PM CET Jin, Yao wrote: >> Hi Wolff, >> >> Thanks a lot for your test code! >> >> I have updated my patch. The new output for your test code (binary name >> is inline) is: >> >> # Overhead Command Shared Object Symbol >> # ........ ....... ................... .................................. >> # >> 56.76% inline inline [.] main >> >> ---main >> __libc_start_main >> _start >> >> 40.54% inline libm-2.23.so [.] __hypot_finite >> >> ---__hypot_finite >> >> --40.09%--__hypot >> main >> __libc_start_main >> _start >> >> 1.30% inline libm-2.23.so [.] __hypot >> >> ---__hypot >> main >> >> ---/usr/include/c++/5/bits/random.h:151 (inline) >> /usr/include/c++/5/bits/random.h:332 (inline) >> /usr/include/c++/5/bits/random.tcc:3328 (inline) >> /usr/include/c++/5/bits/random.h:185 (inline) >> /usr/include/c++/5/bits/random.h:1818 (inline) >> /usr/include/c++/5/bits/random.h:1809 (inline) >> /home/jinyao/skl-ws/perf-dev/lck-2867/test/inline.cpp:14 (inline) >> __libc_start_main >> _start >> >> The inline entry is tagged with "(inline)". Is this result within >> expectation? > No, this is not the expected output. I expect to get information about the > inlined frames in the middle of the call stack, in this example that happens > for the first two major hotspots. > > Below is the output from my approach to this problem using my -g srcline: > > ~~~~~~~~~~~~~~ pasted here for readability: https://paste.kde.org/pmq3bc1le > Samples: 149 of event 'cycles:ppp', Event count (approx.): 141334499 > Overhead Command Shared Object Symbol > - 62.24% inline inline [.] main > - 27.98% std::generate_canonical std::linear_congruential_engine > > random.tcc:3332 > std::__detail::_Adaptor 16807ul, 0ul, 2147483647ul>, double>::operator() random.h:185 > std::uniform_real_distribution::operator() long, 16807ul, 0ul, 2147483647ul> > random.h:1818 > std::uniform_real_distribution::operator() long, 16807ul, 0ul, 2147483647ul> > random.h:1809 > main ine.cpp:14 > __libc_start_main +241 > _start +4194346 > - 25.88% std::__detail::_Mod true, true>::__calc random.h:143 > std::__detail::__mod > random.h:151 > std::linear_congruential_engine 2147483647ul>::operator() random.h:332 > std::generate_canonical std::linear_congruential_engine > > random.tcc:3332 > std::__detail::_Adaptor 16807ul, 0ul, 2147483647ul>, double>::operator() random.h:185 > std::uniform_real_distribution::operator() long, 16807ul, 0ul, 2147483647ul> > random.h:1818 > std::uniform_real_distribution::operator() long, 16807ul, 0ul, 2147483647ul> > random.h:1809 > main ine.cpp:14 > __libc_start_main +241 > _start +4194346 > + 4.14% main inline.cpp:13 > + 2.89% > std::uniform_real_distribution::operator() long, 16807ul, 0ul, 2147483647ul> > random.h:1818 > + 0.68% std::_Norm_helper::_S_do_it complex:655 > + 0.67% std::generate_canonical std::linear_congruential_engine > > random.tcc:3326 > - 26.24% inline libm-2.24.so [.] __hypot_finite > - __hypot_finite +179 > - 25.56% hypot +20 > std::__complex_abs complex:589 > std::abs complex:597 > std::_Norm_helper::_S_do_it complex:654 > std::norm complex:664 > main ine.cpp:14 > __libc_start_main +241 > _start +4194346 > 0.68% 0x40ead238ed1a2cf4 > - 6.85% inline libm-2.24.so [.] hypot > hypot +40 > std::__complex_abs complex:589 > std::abs complex:597 > std::_Norm_helper::_S_do_it complex:654 > std::norm complex:664 > main ine.cpp:14 > __libc_start_main +241 > _start +4194346 > ~~~~~~~~~~~~~~ > > I hope you see the value of such a report versus what you are proposing. > > Thanks >