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: Wed, 19 May 2010 17:11:37 -0300	[thread overview]
Message-ID: <20100519201137.GA26284@ghostprotocols.net> (raw)
In-Reply-To: <AANLkTindijJnIeElAkoj0CGC7nJwVEzIC_OlDbJ_adE8@mail.gmail.com>

Em Wed, May 19, 2010 at 09:36:45PM +0200, Stephane Eranian escreveu:
> Hi,
> 
> On Wed, May 19, 2010 at 7:01 PM, Arnaldo Carvalho de Melo
> <acme@infradead.org> wrote:
> > Hi Ingo,
> >
> >        Please pull from:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf
> >
> > Stephane and Tom,
> >
> >        Now the build id code should be back working:
> >
> > [root@doppio linux-2.6-tip]# rm -rf /root/.debug/
> > [root@doppio linux-2.6-tip]# perf record find / > /dev/null
> > ^C[ perf record: Woken up 3 times to write data ]
> > [ perf record: Captured and wrote 0.667 MB perf.data (~29163 samples) ]
> > [root@doppio linux-2.6-tip]# perf buildid-list
> > 349199a1e1b7cc25ac4f7004deed260f0146665e [kernel.kallsyms]
> 
> 
> It is working again for me too. Thanks for the quick fix.

Great, and thanks for the "quick" part, myself I thought it took more
time than needed :-)
 
> Related to .debug, I think it would be useful to have a choice as to
> where all that stuff gets saved. It is hardcoded to $HOME today.
> 
> We could provide:
> - an environment variable, e.g., PERFHOME or PERFDEBUGDIR
> - an option to perf record, perf report, perf annotate, i.e., all commands
>   that use .debug
> 
> I looked at that today and I have a draft patch to add both the variable
> + the option.
>

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.

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.

> have in your $HOME dir. I think the option has the advantage of making this
> explicit. It would still default to $HOME if not set.

> 
> > 1f095dcd586045d7aa158b4774b8b053e7f580a4 /lib/modules/2.6.34-rc6/kernel/net/ipv4/netfilter/nf_nat.ko
> > 78913cef49182f29a0237d9867ff12811df00663 /lib/modules/2.6.34-rc6/kernel/drivers/md/dm-crypt.ko
> > 5b2b076ef0b0be593d76c96fbd4393455380e589 /lib/modules/2.6.34-rc6/kernel/drivers/ata/sata_sil.ko
> > b6c457f3d69870e6f68f2c61978f8e3beb25221c /lib/modules/2.6.34-rc6/kernel/drivers/net/e1000e/e1000e.ko
> > 2249bf363819205e320e242af2e757906be5010e /lib/modules/2.6.34-rc6/kernel/drivers/gpu/drm/i915/i915.ko
> > a8e4f743b40fb1fd8b85e2f9b88d93b661472b8f /bin/find
> > eb4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1 /lib64/libc-2.10.2.so
> > 5c68f7afeb33309c78037e374b0deee84dd441f6 /lib64/libpthread-2.10.2.so
> > [root@doppio linux-2.6-tip]# ls -la /root/.debug/
> > total 28
> > drwxr-xr-x   7 root root 4096 Mai 19 13:56 .
> > drwxr-x---. 31 root root 4096 Mai 19 13:56 ..
> > drwxr-xr-x   3 root root 4096 Mai 19 13:56 bin
> > drwxr-xr-x  76 root root 4096 Mai 19 13:56 .build-id
> > drwxr-xr-x   2 root root 4096 Mai 19 13:56 [kernel.kallsyms]
> > drwxr-xr-x   3 root root 4096 Mai 19 13:56 lib
> > drwxr-xr-x   4 root root 4096 Mai 19 13:56 lib64
> > [root@doppio linux-2.6-tip]# ls -la /root/.debug/.build-id/
> > 03/ 0c/ 13/ 1e/ 20/ 28/ 2b/ 2d/ 34/ 3b/ 3f/ 47/ 56/ 5b/ 5e/ 6e/ 72/ 7e/
> > 85/ 87/ 94/ 98/ a0/ a5/ a8/ ac/ bc/ c8/ cc/ d9/ dd/ e2/ e8/ eb/ ef/ f2/
> > fd/ 0b/ 0e/ 19/ 1f/ 22/ 29/ 2c/ 2e/ 39/ 3e/ 42/ 55/ 57/ 5c/ 62/ 6f/ 78/
> > 80/ 86/ 91/ 97/ 99/ a1/ a7/ a9/ b6/ c6/ ca/ d8/ dc/ df/ e3/ e9/ ed/ f1/
> > fa/ fe/
> > [root@doppio linux-2.6-tip]# ls -la /root/.debug/lib64/libc-2.10.2.so/eb4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1
> > -rwxr-xr-x 2 root root 1825560 Nov 20 09:29 /root/.debug/lib64/libc-2.10.2.so/eb4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1
> > [root@doppio linux-2.6-tip]# ls -la /root/.debug/.build-id/eb/4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1
> > lrwxrwxrwx 1 root root 67 Mai 19 13:56 /root/.debug/.build-id/eb/4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1 -> ../../lib64/libc-2.10.2.so/eb4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1
> > [root@doppio linux-2.6-tip]#
> > [root@doppio linux-2.6-tip]# perf archive
> > Now please run:
> >
> > $ tar xvf perf.data.tar.bz2 -C ~/.debug
> >
> > wherever you need to run 'perf report' on.
> > [root@doppio linux-2.6-tip]#
> >
> > ot@doppio linux-2.6-tip]# tar tvf perf.data.tar.bz2
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/34/9199a1e1b7cc25ac4f7004deed260f0146665e -> ../../[kernel.kallsyms]/349199a1e1b7cc25ac4f7004deed260f0146665e
> > -rw-r--r-- root/root   2842888 2010-05-19 13:56 [kernel.kallsyms]/349199a1e1b7cc25ac4f7004deed260f0146665e
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/1f/095dcd586045d7aa158b4774b8b053e7f580a4 -> ../../lib/modules/2.6.34-rc6/kernel/net/ipv4/netfilter/nf_nat.ko/1f095dcd586045d7aa158b4774b8b053e7f580a4
> > -rw-r--r-- root/root   1670552 2010-04-30 11:43 lib/modules/2.6.34-rc6/kernel/net/ipv4/netfilter/nf_nat.ko/1f095dcd586045d7aa158b4774b8b053e7f580a4
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/78/913cef49182f29a0237d9867ff12811df00663 -> ../../lib/modules/2.6.34-rc6/kernel/drivers/md/dm-crypt.ko/78913cef49182f29a0237d9867ff12811df00663
> > -rw-r--r-- root/root    326827 2010-04-30 11:43 lib/modules/2.6.34-rc6/kernel/drivers/md/dm-crypt.ko/78913cef49182f29a0237d9867ff12811df00663
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/5b/2b076ef0b0be593d76c96fbd4393455380e589 -> ../../lib/modules/2.6.34-rc6/kernel/drivers/ata/sata_sil.ko/5b2b076ef0b0be593d76c96fbd4393455380e589
> > -rw-r--r-- root/root    325915 2010-04-30 11:43 lib/modules/2.6.34-rc6/kernel/drivers/ata/sata_sil.ko/5b2b076ef0b0be593d76c96fbd4393455380e589
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/b6/c457f3d69870e6f68f2c61978f8e3beb25221c -> ../../lib/modules/2.6.34-rc6/kernel/drivers/net/e1000e/e1000e.ko/b6c457f3d69870e6f68f2c61978f8e3beb25221c
> > -rw-r--r-- root/root   2587163 2010-04-30 11:43 lib/modules/2.6.34-rc6/kernel/drivers/net/e1000e/e1000e.ko/b6c457f3d69870e6f68f2c61978f8e3beb25221c
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/22/49bf363819205e320e242af2e757906be5010e -> ../../lib/modules/2.6.34-rc6/kernel/drivers/gpu/drm/i915/i915.ko/2249bf363819205e320e242af2e757906be5010e
> > -rw-r--r-- root/root   8296246 2010-04-30 11:43 lib/modules/2.6.34-rc6/kernel/drivers/gpu/drm/i915/i915.ko/2249bf363819205e320e242af2e757906be5010e
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/a8/e4f743b40fb1fd8b85e2f9b88d93b661472b8f -> ../../bin/find/a8e4f743b40fb1fd8b85e2f9b88d93b661472b8f
> > -rwxr-xr-x root/root    233032 2009-02-24 14:13 bin/find/a8e4f743b40fb1fd8b85e2f9b88d93b661472b8f
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/eb/4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1 -> ../../lib64/libc-2.10.2.so/eb4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1
> > -rwxr-xr-x root/root   1825560 2009-11-20 09:29 lib64/libc-2.10.2.so/eb4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1
> > lrwxrwxrwx root/root         0 2010-05-19 13:56 .build-id/5c/68f7afeb33309c78037e374b0deee84dd441f6 -> ../../lib64/libpthread-2.10.2.so/5c68f7afeb33309c78037e374b0deee84dd441f6
> > -rwxr-xr-x root/root    148528 2009-11-20 09:29 lib64/libpthread-2.10.2.so/5c68f7afeb33309c78037e374b0deee84dd441f6
> > [root@doppio linux-2.6-tip]#
> >
> > Regards,
> >
> > - Arnaldo
> >
> > Arnaldo Carvalho de Melo (2):
> >  perf symbols: Don't try to read the build-id twice
> >  perf session: Make read_build_id routines look at the host_machine too
> >
> >  tools/perf/util/header.c  |   84 ++++++++++++++++++++++++++++-----------------
> >  tools/perf/util/session.c |    7 ++++
> >  tools/perf/util/session.h |    8 +---
> >  tools/perf/util/symbol.c  |   13 ++++++-
> >  tools/perf/util/symbol.h  |    1 +
> >  5 files changed, 73 insertions(+), 40 deletions(-)
> >
> >

  reply	other threads:[~2010-05-19 20:12 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 [this message]
2010-05-19 20:55     ` Stephane Eranian
2010-05-20 14:23       ` Arnaldo Carvalho de Melo
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=20100519201137.GA26284@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).