Re: [GIT PULL 0/2] perf session fix host_machine handling wrt build ids

From: Stephane Eranian
Date: Wed May 19 2010 - 16:56:11 EST


On Wed, May 19, 2010 at 10:11 PM, Arnaldo Carvalho de Melo
<acme@xxxxxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxx> 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 :-)

Well I could not understand the logical code flow with buildids, that's why
I posted the bug report. I am glad you fixed this.

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

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

>
> 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/