aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorCody P Schafer <cody@linux.vnet.ibm.com>2012-08-10 18:23:00 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-13 13:37:37 -0400
commitd26cd12b46cb6b5595143804b43ba5aa7968551e (patch)
tree80a2c383f5b3d06d17692d65abd734102e37b8b3 /tools/perf/util/symbol.c
parenta44f605b2f6eadb771a052aa3a5eefb342b38a39 (diff)
perf symbols: Factor want_symtab out of dso__load_sym()
Only one callsite of dso__load_sym() uses the want_symtab functionality, so place the logic at the callsite instead of within dso__load_sym(). This sets us up for removal of want_symtab completely once we keep multiple elf handles (within symsrc's) around. 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-15-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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index f8a306865201..8e7d74ff6ba5 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1089,8 +1089,12 @@ restart:
1089 if (symsrc__init(&ss, dso, name, symtab_type) < 0) 1089 if (symsrc__init(&ss, dso, name, symtab_type) < 0)
1090 continue; 1090 continue;
1091 1091
1092 ret = dso__load_sym(dso, map, &ss, filter, 0, 1092 if (want_symtab && !symsrc__has_symtab(&ss)) {
1093 want_symtab); 1093 symsrc__destroy(&ss);
1094 continue;
1095 }
1096
1097 ret = dso__load_sym(dso, map, &ss, filter, 0);
1094 1098
1095 /* 1099 /*
1096 * Some people seem to have debuginfo files _WITHOUT_ debug 1100 * Some people seem to have debuginfo files _WITHOUT_ debug
@@ -1376,7 +1380,7 @@ int dso__load_vmlinux(struct dso *dso, struct map *map,
1376 if (symsrc__init(&ss, dso, symfs_vmlinux, symtab_type)) 1380 if (symsrc__init(&ss, dso, symfs_vmlinux, symtab_type))
1377 return -1; 1381 return -1;
1378 1382
1379 err = dso__load_sym(dso, map, &ss, filter, 0, 0); 1383 err = dso__load_sym(dso, map, &ss, filter, 0);
1380 symsrc__destroy(&ss); 1384 symsrc__destroy(&ss);
1381 1385
1382 if (err > 0) { 1386 if (err > 0) {