linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH perf/core v2 0/5] perf-probe: improve glibc support
@ 2015-03-06  7:31 Masami Hiramatsu
  2015-03-06  7:31 ` [PATCH perf/core v2 1/5] perf-probe: Fix to handle aliased symbols in glibc Masami Hiramatsu
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Masami Hiramatsu @ 2015-03-06  7:31 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Naohiro Aota, Peter Zijlstra, Linux Kernel Mailing List,
	David Ahern, namhyung, Jiri Olsa, Ingo Molnar

Hi,

Here is a series of patches which improves perf-probe to
handle glibc's aliased symbols and weak symbols more
correctly.

This version includes 2 new patches from Namhyung (Thanks!)
which solves a problem on weak symbols. I added a fix
on his latter patch to modify find_alternative_probe_point,
and dropped a bugfix which is already merged.
So, this series is a merged series of below 2 series.

http://lkml.kernel.org/g/20150302124939.9191.33564.stgit@localhost.localdomain
http://lkml.kernel.org/g/1425477143-5310-1-git-send-email-namhyung@kernel.org

======
A major known issue of probing on glibc is that the
some aliased symbols(e.g. malloc) and weak symbols
(e.g. calloc) 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.

And weak symbols have been dropped when loading.

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 and weak symbols on glibc.

Thank you,


---

Masami Hiramatsu (3):
      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"

Namhyung Kim (2):
      perf symbols: Allow symbol alias when loading map for symbol name
      perf probe: Allow weak symbols to be probed


 tools/perf/util/machine.c        |    2 
 tools/perf/util/map.c            |    6 +
 tools/perf/util/map.h            |    8 +-
 tools/perf/util/probe-event.c    |  185 +++++++++++++++++++++++++++++++++-----
 tools/perf/util/symbol-elf.c     |    5 +
 tools/perf/util/symbol-minimal.c |    2 
 tools/perf/util/symbol.c         |    8 +-
 tools/perf/util/symbol.h         |    5 +
 8 files changed, 182 insertions(+), 39 deletions(-)

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-03-14  7:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-06  7:31 [PATCH perf/core v2 0/5] perf-probe: improve glibc support Masami Hiramatsu
2015-03-06  7:31 ` [PATCH perf/core v2 1/5] perf-probe: Fix to handle aliased symbols in glibc Masami Hiramatsu
2015-03-06 17:59   ` Arnaldo Carvalho de Melo
2015-03-06 18:02     ` Arnaldo Carvalho de Melo
2015-03-14  7:02   ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2015-03-06  7:31 ` [PATCH perf/core v2 2/5] perf-probe: Fix --line " Masami Hiramatsu
2015-03-14  7:02   ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2015-03-06  7:31 ` [PATCH perf/core v2 3/5] Revert "perf probe: Fix to fall back to find probe point in symbols" Masami Hiramatsu
2015-03-14  7:03   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2015-03-06  7:31 ` [PATCH perf/core v2 4/5] perf symbols: Allow symbol alias when loading map for symbol name Masami Hiramatsu
2015-03-06 18:06   ` Arnaldo Carvalho de Melo
2015-03-06 18:26     ` Arnaldo Carvalho de Melo
2015-03-06 18:32       ` Arnaldo Carvalho de Melo
2015-03-14  7:03   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-03-06  7:31 ` [PATCH perf/core v2 5/5] perf probe: Allow weak symbols to be probed Masami Hiramatsu
2015-03-14  7:03   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-03-06 18:45 ` [PATCH perf/core v2 0/5] perf-probe: improve glibc support Arnaldo Carvalho de Melo

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