Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751801AbdCRReu (ORCPT ); Sat, 18 Mar 2017 13:34:50 -0400 Received: from mail.kdab.com ([176.9.126.58]:40530 "EHLO mail.kdab.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbdCRRet (ORCPT ); Sat, 18 Mar 2017 13:34:49 -0400 From: Milian Wolff To: Jin Yao Cc: acme@kernel.org, jolsa@kernel.org, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com Subject: Re: [PATCH v5 0/5] perf report: Show inline stack Date: Sat, 18 Mar 2017 17:41:09 +0100 Message-ID: <1532086.vKWRnURGfG@agathebauer> Organization: KDAB (Deutschland) GmbH&Co KG, a KDAB Group company In-Reply-To: <1489700547-7260-1-git-send-email-yao.jin@linux.intel.com> References: <1489700547-7260-1-git-send-email-yao.jin@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1680545.BEKMZCGZMa"; micalg="sha1"; protocol="application/pkcs7-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 11509 Lines: 219 --nextPart1680545.BEKMZCGZMa Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" On Donnerstag, 16. M=E4rz 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 fo= r=20 me. Arnaldo, could you please consider merging this? It's an extremely useful=20 feature and direly missing from perf so far. That said, Jin, here are some observations that could be improved in the=20 future (I don't think any of these should hold back merging this feature no= w): =46or the following example code build with "-O2 -g" and recorded with "--c= all- graph dwarf" I observe some output combinations that could potentially be=20 improved in the future: ~~~~~~~~~~~~~~~~~~~~ #include #include #include #include using namespace std; int main() { uniform_real_distribution uniform(-1E5, 1E5); default_random_engine engine; double s =3D 0; for (int i =3D 0; i < 10000000; ++i) { s +=3D norm(complex(uniform(engine), uniform(engine))); } cout << s << '\n'; return 0; } ~~~~~~~~~~~~~~~~ #1 duplicated entries when grouping by function: ~~~~~~~~~~~~~~~~ perf report --inline --stdio =2E.. --35.34%--_start __libc_start_main main main (inline) std::uniform_real_distribution::operator() > (inline) std::uniform_real_distribution::operator() > (inline) std::__detail::_Adaptor, double>::operator() (inline) ~~~~~~~~~~~~~~~~ Here, we see main twice, once for the "real" frame, and once for an inlined= =20 one? Then we see the same function twice as inlined frame, which is also od= d. ~~~~~~~~~~~~~~~~ perf report --inline --stdio --no-children =2E.. 59.81% cpp-inlining libm-2.25.so [.] __hypot_finite | ---__hypot_finite hypot main std::norm (inline) main (inline) __libc_start_main _start ~~~~~~~~~~~~~~~~ Here we see a confusing output. The first "main" frame below "hypot" is=20 actually code form cpp's complex header which got inlined into main. That=20 associates the wrong function name to this frame, i.e. "main" instead of=20 std::norm". When the inline stack is shown below we actually see what happe= ns,=20 i.e. we eventually end up in main again, but of course this output is not t= he=20 best as-is. But, again: I think these are minor issues, and the feature itself is alrea= dy=20 extremely useful and I hope to see it finally merged. Thanks again Jin for your good work! Cheers =2D-=20 Milian Wolff | milian.wolff@kdab.com | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt Experts --nextPart1680545.BEKMZCGZMa Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIUdzCCBGYw ggNOoAMCAQICEFEmCpMc4n+cw6VfeeByroIwDQYJKoZIhvcNAQEFBQAwgZMxCzAJBgNVBAYTAlVT MQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRoZSBVU0VS VFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0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