diff options
author | Cody P Schafer <cody@linux.vnet.ibm.com> | 2012-08-10 15:22:59 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-13 14:34:36 -0300 |
commit | a44f605b2f6eadb771a052aa3a5eefb342b38a39 (patch) | |
tree | 924153f1da161016a68358e61268a1862fc5bb43 /tools/perf/util/symbol.c | |
parent | 005f92947a0da7eb47b0f1ff611f8fc3d7ab4751 (diff) | |
download | op-kernel-dev-a44f605b2f6eadb771a052aa3a5eefb342b38a39.zip op-kernel-dev-a44f605b2f6eadb771a052aa3a5eefb342b38a39.tar.gz |
perf symbols: Switch dso__synthesize_plt_symbols() to use symsrc
Previously dso__synthesize_plt_symbols() was reopening the elf file to
obtain dynsyms from it. Rather than reopen the file, use the already
opened reference within the symsrc to access it.
Setup for the later patch
"perf symbols: Use both runtime and debug images"
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-14-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.c')
-rw-r--r-- | tools/perf/util/symbol.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 2b3495a..f8a3068 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1091,21 +1091,23 @@ restart: ret = dso__load_sym(dso, map, &ss, filter, 0, want_symtab); - symsrc__destroy(&ss); /* * Some people seem to have debuginfo files _WITHOUT_ debug * info!?!? */ - if (!ret) + if (!ret) { + symsrc__destroy(&ss); continue; + } if (ret > 0) { int nr_plt; - nr_plt = dso__synthesize_plt_symbols(dso, name, map, filter); + nr_plt = dso__synthesize_plt_symbols(dso, &ss, map, filter); if (nr_plt > 0) ret += nr_plt; + symsrc__destroy(&ss); break; } } |