[PATCH perf/core 0/4] perf-probe: improve glibc support

Masami Hiramatsu
2015-03-02T12:50:57Z

Hi,

Here is a series of patches which improves perf-probe to
handle glibc's aliased symbols more correctly. Longly,
a major known issue of probing on glibc is that the
some aliased symbols(e.g. malloc) can not find by
perf-probe.

Actually, glibc's malloc symbol is just an alias of
__libc_malloc. Its debuginfo knows only __libc_malloc,
and perf's symbol map knows only malloc. This difference
always confuses users that they can see malloc by perf
report or annotate, but they can not probe on it, nor
find definitions by --line option.

Previously, I've made a commit 906451b98b67 which solved
this problem partly, but not completely fixed.
So I decided to solve this issue completely by finding
the symbols like malloc from perf's symbol map, and
converting the symbol's address into debuginfo's
location infomation.

With this series, you can use --vars, --line and --add
with the aliased symbols on glibc.

Note that the 1/4 patch is just a resend patch which I
sent last weekend (since this series depends on that)
http://www.gossamer-threads.com/lists/linux/kernel/2115623

2/4 and 3/4 introduces above logic to solve this issue.
And 4/4 reverts previous incomplete fix.

Thank you,

---

Masami Hiramatsu (4):
[RESEND][BUGFIX] perf-probe: Remove bias offset to find probe point by address
perf-probe: Fix to handle aliased symbols in glibc
perf-probe: Fix --line to handle aliased symbols in glibc
Revert "perf probe: Fix to fall back to find probe point in symbols"

tools/perf/util/probe-event.c | 181 +++++++++++++++++++++++++++++++++++-----
tools/perf/util/probe-finder.c | 5 -
2 files changed, 160 insertions(+), 26 deletions(-)

--
Masami HIRAMATSU
Software Platform Research Dpt. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com