From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762207AbdEXHVx (ORCPT ); Wed, 24 May 2017 03:21:53 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33170 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757547AbdEXHVv (ORCPT ); Wed, 24 May 2017 03:21:51 -0400 Date: Wed, 24 May 2017 09:21:42 +0200 From: Ingo Molnar To: Namhyung Kim Cc: LKML , kernel-team@lge.com, Arnaldo Carvalho de Melo , Jiri Olsa , Milian Wolff , Yao Jin Subject: Re: [PATCH 4/7] perf script: Add --inline option Message-ID: <20170524072142.cto7coohqwhake6t@gmail.com> References: <20170524062129.32529-1-namhyung@kernel.org> <20170524062129.32529-5-namhyung@kernel.org> <20170524063811.onm2gder5kfks6jb@gmail.com> <20170524071330.GA32206@sejong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170524071330.GA32206@sejong> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Namhyung Kim wrote: > On Wed, May 24, 2017 at 08:38:11AM +0200, Ingo Molnar wrote: > > > > * Namhyung Kim wrote: > > > > > The --inline option is to show inlined functions in callchains. > > > > > > For example, > > > > > > $ perf script > > > a.out 5644 11611.467597: 309961 cycles:u: > > > 790 main (/home/namhyung/tmp/perf/a.out) > > > 20511 __libc_start_main (/usr/lib/libc-2.25.so) > > > 8ba _start (/home/namhyung/tmp/perf/a.out) > > > ... > > > > > > $ perf script --inline > > > a.out 5644 11611.467597: 309961 cycles:u: > > > 790 main (/home/namhyung/tmp/perf/a.out) > > > std::__detail::_Adaptor, double>::operator() > > > std::uniform_real_distribution::operator() > > > > std::uniform_real_distribution::operator() > > > > main > > > 20511 __libc_start_main (/usr/lib/libc-2.25.so) > > > 8ba _start (/home/namhyung/tmp/perf/a.out) > > > ... > > > > Shouldn't this be the default behavior, to make call chains more readable? > > AFAIK perf report didn't make it default due to a performance impact, > but I didn't know how much it is. Especially if perf was not built > with libbfd it'll run external addr2line to get inlined functions for > each callchain entry.. So then at least let's make it the default when all libraries are present. Not enabling something when the build is not 'complete' is fair game - distros will typically have all the libraries available. We need to remember that roughly 99% of all our users will use as few perf command line options as they can get away with - myself included. Adding a non-debugging feature as a non-default command line option is really as if we didn't do anything: very few if any people will use it, and it might bitrot in the future without people noticing. So we need apply some thought into making it available to two orders of magnitude more people! If someone types 'perf report' we should give the best selection of all the features we have available. Thanks, Ingo