All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [RFC/PATCH] perf record: Save build-id of DSO in callchains
Date: Mon, 23 Mar 2015 17:18:21 +0900	[thread overview]
Message-ID: <20150323081821.GE2782@sejong> (raw)
In-Reply-To: <20150323072213.GB22765@gmail.com>

Hi Ingo,

On Mon, Mar 23, 2015 at 08:22:14AM +0100, Ingo Molnar wrote:
> 
> * Namhyung Kim <namhyung@kernel.org> wrote:
> 
> > Currently the build-id only recorded for sampled location, but in
> > order to correctly view/annotate callchains it might need the
> > build-id's of callchains too.  I guess this choice was due to a
> > performance impact on the post-processing at perf record time.
> > 
> > Add a new option --buildid-callchain to record this info.
> > 
> > $ perf record -o xxx -g -- perf > /dev/null
> > $ perf buildid-list -i xxx
> > 6ebcee76c4b04895598b4df86ec445c49fc137a2 /lib/modules/3.18.6-1-ARCH/build/vmlinux
> > fc0759b71584d2513b04f1b530965a61b5e499e2 /usr/lib/ld-2.21.so
> > 
> > $ perf record -o yyy -g --buildid-callchain -- perf > /dev/null
> > $ perf buildid-list -i yyy
> > 6ebcee76c4b04895598b4df86ec445c49fc137a2 /lib/modules/3.18.6-1-ARCH/build/vmlinux
> > 4235ae90856f98d2746529648a3339ebfa6ede43 /home/namhyung/project/linux/tools/perf/perf
> > fc0759b71584d2513b04f1b530965a61b5e499e2 /usr/lib/ld-2.21.so
> > 9ac81172d5ff96f40d984fe7c10073a98f1a6b2e /usr/lib/libc-2.21.so
> > 864583bb881db1d260660a30a51b3f5022cd538b /usr/lib/libnuma.so.1.0.0
> 
> Just curious, could you try to measure the performance impact of this 
> change?

  $ time perf record --call-graph dwarf -o kbuild.xxx -a -- sleep 30
  [ perf record: Woken up 34674 times to write data ]
  [ perf record: Captured and wrote 9538.729 MB kbuild.xxx (1211997 samples) ]

  real   0m32.244s
  user   0m1.097s
  sys    0m8.997s

  $ time perf record --call-graph dwarf -o kbuild.yyy --buildid-callchain -a -- sleep 30
  [ perf record: Woken up 40902 times to write data ]
  [ perf record: Captured and wrote 11208.500 MB kbuild.yyy (1433922 samples) ]

  real   2m21.695s
  user   1m33.127s
  sys    0m22.077s

> 
> Also, unless the performance (or file size) effect is horrible, I 
> think this flag should be implicitly set by -g.

Agreed.  But unfortunately, it seems horrible. ;-p

> 
> 99.999% of users won't know about this flag, and will see broken 
> annotations!

Well, most of them will see correct one unless the binary is changed
in the meantime. :)

Thanks,
Namhyung

  reply	other threads:[~2015-03-23  8:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23  1:18 [RFC/PATCH] perf record: Save build-id of DSO in callchains Namhyung Kim
2015-03-23  7:22 ` Ingo Molnar
2015-03-23  8:18   ` Namhyung Kim [this message]
2015-03-23 13:44     ` David Ahern
2015-03-23 16:28       ` Arnaldo Carvalho de Melo
2015-03-23 23:30       ` Namhyung Kim

Reply instructions:

You may reply publicly 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=20150323081821.GE2782@sejong \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.