From 261360b6e90a782f0a63d8f61a67683c376c88cf Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Fri, 10 Aug 2012 15:23:01 -0700 Subject: perf symbols: Convert dso__load_syms to take 2 symsrc's To properly handle platforms with an opd section, both a runtime image (which contains the opd section but possibly lacks symbols) and a symbol image (which probably lacks an opd section but has symbols). The next patch ("perf symbol: use both runtime and debug images") adjusts the callsite in dso__load() to take advantage of being able to pass both runtime & debug images. Assumptions made here: - The opd section, if it exists in the runtime image, has headers in both the runtime image and the debug/syms image. - The index of the opd section (again, only if it exists in the runtime image) is the same in both the runtime and debug/symbols image. Both of these are true on RHEL, but it is unclear how accurate they are in general (on platforms with function descriptors in opd sections). Signed-off-by: Cody P Schafer Cc: David Hansen Cc: Ingo Molnar Cc: Matt Hellsley Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Link: http://lkml.kernel.org/r/1344637382-22789-16-git-send-email-cody@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/symbol.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/perf/util/symbol.h') diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index fa9f6b1cdc46..1f3eed21f35d 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -369,8 +369,9 @@ ssize_t dso__data_read_addr(struct dso *dso, struct map *map, struct machine *machine, u64 addr, u8 *data, ssize_t size); int dso__test_data(void); -int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *ss, - symbol_filter_t filter, int kmodule); +int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, + struct symsrc *runtime_ss, symbol_filter_t filter, + int kmodule); int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss, struct map *map, symbol_filter_t filter); -- cgit v1.2.3