summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol-minimal.c
diff options
context:
space:
mode:
authorCody P Schafer <cody@linux.vnet.ibm.com>2012-08-10 15:23:02 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-13 14:46:55 -0300
commit3aafe5ae08f2aed378e06d78b207883879d25cbe (patch)
treecf1eeeefb542e6abe0d52346193a5d64f3dce4f2 /tools/perf/util/symbol-minimal.c
parent261360b6e90a782f0a63d8f61a67683c376c88cf (diff)
downloadlinux-3aafe5ae08f2aed378e06d78b207883879d25cbe.tar.gz
linux-3aafe5ae08f2aed378e06d78b207883879d25cbe.tar.xz
perf symbols: Use both runtime and debug images
We keep both a 'runtime' elf image as well as a 'debug' elf image around and generate symbols by looking at both of these. This eliminates the need for the want_symtab/goto restart mechanism combined with iterating over and reopening the elf images a second time. Also give dso__synthsize_plt_symbols() the runtime image (which has dynsyms) instead of the symbol image (which may only have a symtab and no dynsyms). Previously if a debug image was found all runtime images were ignored. This fixes 2 issues: - Symbol resolution to failure on PowerPC systems with debug symbols installed, as the debug images lack a '.opd' section which contains function descriptors. - On all archs, plt synthesis failed when a debug image was loaded and that debug image lacks a dynsym section while a runtime image has a dynsym section. Assumptions: - If a .opd section exists, it is contained in the highest priority image with a dynsym section. - This generally implies that the debug image lacks a dynsym section (ie: it is marked as NO_BITS). Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Cc: David Hansen <dave@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Matt Hellsley <matthltc@us.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/1344637382-22789-17-git-send-email-cody@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol-minimal.c')
-rw-r--r--tools/perf/util/symbol-minimal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c
index 7747ea6d7e97..6738ea128c90 100644
--- a/tools/perf/util/symbol-minimal.c
+++ b/tools/perf/util/symbol-minimal.c
@@ -260,6 +260,12 @@ out_close:
return -1;
}
+bool symsrc__possibly_runtime(struct symsrc *ss __used)
+{
+ /* Assume all sym sources could be a runtime image. */
+ return true;
+}
+
bool symsrc__has_symtab(struct symsrc *ss __used)
{
return false;