summaryrefslogtreecommitdiff
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorDavid Ahern <daahern@cisco.com>2010-12-07 19:39:46 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-12-09 11:07:07 -0200
commitb226a5a72901bc9c73d639ea2e53e6c304bf3b74 (patch)
tree3cc388b8450f95af1909c1ce00978b5db6ed17a5 /tools/perf/util/symbol.c
parent2c6cb1053ad8b61ab9fb50b578d0ffea959f7583 (diff)
downloadlinux-3.10-b226a5a72901bc9c73d639ea2e53e6c304bf3b74.tar.gz
linux-3.10-b226a5a72901bc9c73d639ea2e53e6c304bf3b74.tar.bz2
linux-3.10-b226a5a72901bc9c73d639ea2e53e6c304bf3b74.zip
perf report: Allow user to specify path to kallsyms file
This is useful for analyzing a perf data file on a different system than the one data was collected on and still include symbols from loaded kernel modules in the output. Commiter note: Updated the man page accordingly. LKML-Reference: <1291775986-16475-1-git-send-email-daahern@cisco.com> Signed-off-by: David Ahern <daahern@cisco.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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index a348906b587..f40c076aeb7 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1830,8 +1830,8 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map,
const char *kallsyms_filename = NULL;
char *kallsyms_allocated_filename = NULL;
/*
- * Step 1: if the user specified a vmlinux filename, use it and only
- * it, reporting errors to the user if it cannot be used.
+ * Step 1: if the user specified a kallsyms or vmlinux filename, use
+ * it and only it, reporting errors to the user if it cannot be used.
*
* For instance, try to analyse an ARM perf.data file _without_ a
* build-id, or if the user specifies the wrong path to the right
@@ -1844,6 +1844,11 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map,
* validation in dso__load_vmlinux and will bail out if they don't
* match.
*/
+ if (symbol_conf.kallsyms_name != NULL) {
+ kallsyms_filename = symbol_conf.kallsyms_name;
+ goto do_kallsyms;
+ }
+
if (symbol_conf.vmlinux_name != NULL) {
err = dso__load_vmlinux(self, map,
symbol_conf.vmlinux_name, filter);