linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: "Ingo Molnar" <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Mike Galbraith" <efault@gmx.de>,
	"Paul Mackerras" <paulus@samba.org>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Tom Zanussi" <tzanussi@gmail.com>
Subject: Re: [GIT PULL 0/2] perf session fix host_machine handling wrt build ids
Date: Thu, 20 May 2010 11:23:37 -0300	[thread overview]
Message-ID: <20100520142337.GB26284@ghostprotocols.net> (raw)
In-Reply-To: <AANLkTin1xWNaQLZrMcJmlC4GCKMibjinRmYNtUgxYJAK@mail.gmail.com>

Em Wed, May 19, 2010 at 10:55:55PM +0200, Stephane Eranian escreveu:
> On Wed, May 19, 2010 at 10:11 PM, Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> > Yeah, the NO_NEWT make target was out of our uneasyness about making
> > newt the sole report output, and my patch removing tons of code stolen
> > but not used (greedy us!) was also in that direction, trying to get the
> > git ~/.CONFIG way into perf.

> That's not because I compile with newt support that I want curses output each
> time I use perf report. I could not find an option to turn it off.

> Unless you tell me that if it detects stdout is not a tty it does not
> use newt. But that would not be good enough I think.

Agreed, I'll add something like what git has for formatting, i.e. some
perf report --tty and --tui

With --tui being the default. If someone don't want it they can either
use 'make NO_NEWT=1', use | less, redirect to a file, remove the
newt-devel/libnewt-dev or set it in ~/.perfconfig.

> Ok, so you are advocating that perf configuration options be saved in
> ~/.perfconfig and that would include the destination dir for all the
> "symbolization" files. BTW, I think the name .debug is confusing here.
> It contains symbolization info not debug info. For all I know the
> binaries may have no debug info at all.

Yeah, I even called a symtab cache when I introduced it, but the idea
was that perhaps it could be used by systemtap and other tools that use
build id indexed debugging info, even if it is just a symtab.

But because it doesn't always have just a symtab, I decided to use
something more generic.

perf annotate, for instance, can use the DWARF info there if present.

> > We have to have that and consistent accross the tools command line
> > options to override where this is stored/used.
> >
> > > The problem with the environment variable is that you tend to forget to
> > > set it. As you suggest below, you may run perf report on another machine
> > > too and you don't necessarily want to overwrite the .debug you may already
> >
> > Well, we wouldn't be overwriting anything since we hope that what is
> > used to create the buildid is reasonably safe against collision, so even
> > if the DSOs are for different arches, it should be rather difficult to
> > get 'perf unarchive' causing problems.

> I think you're right. If you have the same file name, e.g.,
> /usr/bin/date but compiled differently, then you should have different
> buildids, thus you will not clash on either leaf files in your tree.
> Directories may already exist but that's okay. Am I right?

Yes, you are. I decided to have DSO names used as a directory where we
store files named by its build ids so that, among others, the following
use case becomes straight forward:

vi app.c
make

# caches app _at this point in time_ by build-id creates perf.data
perf record ./app

# do some changes, optimizations, whatever
vi app.c
make

# caches app _with another build-id_, renames existing perf.data file to
# perf.data.old
perf record ./app

# compares perf.data and perf.data.old, finding the two binary versions
perf diff

	Right now perf.data.old is deleted if present and perf.data is
renamed to it, so we have just two files for perf diff, but we can as
well implement code in 'perf diff' to consider N files, generating
plots, etc, and the build-id cache is what allows this to be done really
seamlessly.

- Arnaldo

  reply	other threads:[~2010-05-20 14:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 17:01 [GIT PULL 0/2] perf session fix host_machine handling wrt build ids Arnaldo Carvalho de Melo
2010-05-19 17:01 ` [PATCH 1/2] perf symbols: Don't try to read the build-id twice Arnaldo Carvalho de Melo
2010-05-19 17:01 ` [PATCH 2/2] perf session: Make read_build_id routines look at the host_machine too Arnaldo Carvalho de Melo
2010-05-19 19:36 ` [GIT PULL 0/2] perf session fix host_machine handling wrt build ids Stephane Eranian
2010-05-19 20:11   ` Arnaldo Carvalho de Melo
2010-05-19 20:55     ` Stephane Eranian
2010-05-20 14:23       ` Arnaldo Carvalho de Melo [this message]
2010-05-20  4:14 ` Tom Zanussi
2010-05-20  9:54 ` Stephane Eranian
2010-05-20 14:29   ` Arnaldo Carvalho de Melo

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=20100520142337.GB26284@ghostprotocols.net \
    --to=acme@infradead.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=tzanussi@gmail.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).