Re: [PATCH] perf lookup of ppc64 symbols

From: Arnaldo Carvalho de Melo
Date: Thu Jun 17 2010 - 11:17:29 EST


Em Fri, Jun 18, 2010 at 12:46:08AM +1000, Anton Blanchard escreveu:
>
> Hi,
>
> > Currently symbol resolution does not work for 64-bit programs
> > using perf. For this to work perf needs to lookup symbol names in
> > the OPD. This patch adds this functionality. The OPD data is
> > used to find symbol names when available.
>
> To clarify, this is an issue with 64bit architectures that use function
> descriptors (eg ppc64). The problem is that a symbol doesn't point to a text
> address, it points to a data area that contains (amongst other things) a
> pointer to the text address.
>
> We look for a section called ".opd" which is the function descriptor
> area. To create the full symbol table, when we see a symbol in the function
> descriptor section we load the first pointer and use that as the text
> address. The only tricky part here is working out which section the
> text address is in. Right now we have a loop which is sub optimal:

I'll update the comment in Eric's patch and apply this to perf/core, for
.36, we can optimize this later, correctness first :-)

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