Re: [PATCH 8/9] perf annotate: fix it for non-prelinked *.so

From: Mike Galbraith
Date: Fri Feb 05 2010 - 01:54:47 EST


On Thu, 2010-02-04 at 17:48 -0200, Arnaldo Carvalho de Melo wrote:
> Em Thu, Feb 04, 2010 at 10:34:04PM +0300, Kirill Smelkov escreveu:
> > On Thu, Feb 04, 2010 at 07:31:46AM +0100, Mike Galbraith wrote:
> > > Monkey see monkey do.
> > >
> > > perf tools: fix perf top module symbol annotation.
> > > "objdump --start-address=0x%016Lx "
> > > "--stop-address=0x%016Lx -dS %s",
> > > - map->unmap_ip(map, sym->start),
> > > - map->unmap_ip(map, sym->end), path);
> > > + map__rip_2objdump(map, sym->start),
> > > + map__rip_2objdump(map, sym->end), path);
> >
> > If I recall correctly, that's not enough.
> >
> > The problem is top code is also wrong at mapping objdump addresses to
> > absolute ip. That is another part of builtin-top.c which does
> > map->unmap_ip(), and I've already suggested a fix back at holidays:
> >
> > http://marc.info/?l=linux-kernel&m=126295508002536&w=2
>
> Yeah, I was looking at Mike's report about 'perf annotate' not working
> with modules, debugged, wrote a patch that looed at the ELF header obj
> type as the key to apply or not the unmap_ip operation and when it was
> working I thought I saw that patch somewhere, looked at yours and
> applied it instead.
>
> Then I was testing your subsequent patches but had to call it a day,
> sent what I had that at least fixed 'annotate' and Mike took it from
> there.
>
> Looking at this now.

Hm, seems to work fine.

(piddle)

Aha, the rest is needed for userland annotation to work.

-Mike

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