From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932583AbdKAMOg (ORCPT ); Wed, 1 Nov 2017 08:14:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55868 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752154AbdKAMOf (ORCPT ); Wed, 1 Nov 2017 08:14:35 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 501D480461 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Wed, 1 Nov 2017 13:14:32 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , kernel-team@lge.com, Jin Yao , Milian Wolff Subject: Re: [PATCH 2/2] perf tools: Show correct function name for srcline of callchains Message-ID: <20171101121432.GB20353@krava> References: <20171031020654.31163-1-namhyung@kernel.org> <20171031020654.31163-2-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171031020654.31163-2-namhyung@kernel.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 01 Nov 2017 12:14:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 31, 2017 at 11:06:54AM +0900, Namhyung Kim wrote: > When libbfd is not used, it doesn't show proper function name and reuse > the original symbol of the sample. That's because it passes the > original sym to inline_list__append(). As `addr2line -f` returns > function names as well, use that to create ad inline_sym and pass it to > inline_list__append(). > > For example, following data shows that inlined entries of main have same > name (main). > > Before: > $ perf report -g srcline -q | head > 45.22% inlining libm-2.26.so [.] __hypot_finite > | > ---__hypot_finite ??:0 > | > |--44.15%--hypot ??:0 > | main complex:589 > | main complex:597 > | main complex:654 > | main complex:664 > | main inlining.cpp:14 > > After: > $ perf report -g srcline -q | head > 45.22% inlining libm-2.26.so [.] __hypot_finite > | > ---__hypot_finite > | > |--44.15%--hypot > | std::__complex_abs complex:589 (inlined) > | std::abs complex:597 (inlined) > | std::_Norm_helper::_S_do_it complex:654 (inlined) > | std::norm complex:664 (inlined) > | main inlining.cpp:14 > > Cc: Jin Yao > Cc: Milian Wolff > Signed-off-by: Namhyung Kim looks ok Reviewed-by: Jiri Olsa jirka