summaryrefslogtreecommitdiff
path: root/tools/perf/util/symbol-elf.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-03-06 07:31:27 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-03-12 15:39:54 (GMT)
commit680d926a8cb08dd9cf173e2bb93d4a4477771949 (patch)
tree9bd4335df12510717562e90779231a14c1d8be1c /tools/perf/util/symbol-elf.c
parent0687eba7872d7dbe01b074c54359315e97502360 (diff)
downloadlinux-680d926a8cb08dd9cf173e2bb93d4a4477771949.tar.xz
perf symbols: Allow symbol alias when loading map for symbol name
When perf probe tries to add a probe in a binary using symbol name, it sometimes failed since some symbols were discard during loading dso. When it resolves an address to symbol, it'd be better to have just one symbol at given address. But for finding address from symbol, it'd be better to keep all names (including aliases). So allow tools to state that they want to allow aliases via symbol_conf.allow_aliases. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Naohiro Aota <naota@elisp.net> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20150306073127.6904.3232.stgit@localhost.localdomain [ Original patch passwd allow_alias to many functions, use symbol_conf.allow_aliases instead ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol-elf.c')
-rw-r--r--tools/perf/util/symbol-elf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index ada1676..62742e4 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -1048,7 +1048,8 @@ new_symbol:
* For misannotated, zeroed, ASM function sizes.
*/
if (nr > 0) {
- symbols__fixup_duplicate(&dso->symbols[map->type]);
+ if (!symbol_conf.allow_aliases)
+ symbols__fixup_duplicate(&dso->symbols[map->type]);
symbols__fixup_end(&dso->symbols[map->type]);
if (kmap) {
/*