LKML Archive on lore.kernel.org
 help / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-team@lge.com, Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Yao Jin <yao.jin@linux.intel.com>
Subject: Re: [PATCH 4/7] perf script: Add --inline option
Date: Wed, 24 May 2017 09:53:49 +0200
Message-ID: <747830927.nmHmt93QeT@milian-kdab2> (raw)
In-Reply-To: <20170524072142.cto7coohqwhake6t@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3443 bytes --]

On Wednesday, May 24, 2017 9:21:42 AM CEST Ingo Molnar wrote:
> * Namhyung Kim <namhyung@kernel.org> wrote:
> > On Wed, May 24, 2017 at 08:38:11AM +0200, Ingo Molnar wrote:
> > > * Namhyung Kim <namhyung@kernel.org> 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<std::linear_congruent
> > > >                          ial_engine<unsigned long, 16807ul, 0ul,
> > > >                          2147483647ul>, double>::operator()
> > > >                          std::uniform_real_distribution<double>::oper
> > > >                          ator()<std::linear_congruential_engine<unsign
> > > >                          ed long, 16807ul, 0ul, 2147483647ul> >
> > > >                          std::uniform_real_distribution<double>::oper
> > > >                          ator()<std::linear_congruential_engine<unsign
> > > >                          ed long, 16807ul, 0ul, 2147483647ul> > 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.

Just a suggestion: My larger patch set that is in review now adds some caching 
features which already speeds up the whole process considerably. As such, my 
suggestion is to wait for this patch set to be integrated. Then we could 
enable --inline unconditionally, or at least only when libbfd is available.

Cheers

-- 
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

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3826 bytes --]

  reply index

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24  6:21 [GIT PULL 0/7] perf/urgent callchain fixes Namhyung Kim
2017-05-24  6:21 ` [PATCH 1/7] perf report: don't crash on invalid maps in `-g srcline` mode Namhyung Kim
2017-05-24  7:03   ` [tip:perf/urgent] perf report: Don't " tip-bot for Milian Wolff
2017-05-24  6:21 ` [PATCH 2/7] perf report: fix memory leak in addr2line when called by addr2inlines Namhyung Kim
2017-05-24  7:04   ` [tip:perf/urgent] perf report: Fix " tip-bot for Milian Wolff
2017-05-24  6:21 ` [PATCH 3/7] perf report: fix off-by-one for non-activation frames Namhyung Kim
2017-05-24  7:05   ` [tip:perf/urgent] perf report: Fix " tip-bot for Milian Wolff
2017-05-24  6:21 ` [PATCH 4/7] perf script: Add --inline option Namhyung Kim
2017-05-24  6:38   ` Ingo Molnar
2017-05-24  7:13     ` Namhyung Kim
2017-05-24  7:21       ` Ingo Molnar
2017-05-24  7:53         ` Milian Wolff [this message]
2017-05-24  8:06           ` Ingo Molnar
2017-05-24  7:05   ` [tip:perf/urgent] perf script: Add --inline option for debugging tip-bot for Namhyung Kim
2017-05-24  6:21 ` [PATCH 5/7] perf report: always honor callchain order for inlined nodes Namhyung Kim
2017-05-24  7:06   ` [tip:perf/urgent] perf report: Always " tip-bot for Milian Wolff
2017-05-24  6:21 ` [PATCH 6/7] perf report: do not drop last inlined frame Namhyung Kim
2017-05-24  7:06   ` [tip:perf/urgent] perf report: Do " tip-bot for Milian Wolff
2017-05-24  6:21 ` [PATCH 7/7] perf tools: Fix to put caller above callee in children mode Namhyung Kim
2017-05-24  7:07   ` [tip:perf/urgent] perf tools: Put caller above callee in --children mode tip-bot for Namhyung Kim
2017-05-24  6:53 ` [GIT PULL 0/7] perf/urgent callchain fixes Ingo Molnar
2017-05-24  6:57   ` [PATCH] tools/include: Sync kernel ABI headers with tooling headers Ingo Molnar
2017-05-24  7:07     ` [tip:perf/urgent] " tip-bot for Ingo Molnar
2017-06-08 13:15 ` [GIT PULL 0/7] perf/urgent callchain fixes Milian Wolff
2017-06-08 13:59   ` Arnaldo Carvalho de Melo
2017-06-08 14:34     ` Milian Wolff

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=747830927.nmHmt93QeT@milian-kdab2 \
    --to=milian.wolff@kdab.com \
    --cc=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=yao.jin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox