diff options
author | David Ahern <daahern@cisco.com> | 2010-12-07 21:39:46 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-12-09 08:07:07 -0500 |
commit | b226a5a72901bc9c73d639ea2e53e6c304bf3b74 (patch) | |
tree | 3cc388b8450f95af1909c1ce00978b5db6ed17a5 /tools/perf/util/symbol.c | |
parent | 2c6cb1053ad8b61ab9fb50b578d0ffea959f7583 (diff) |
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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index a348906b587d..f40c076aeb7b 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, | |||
1830 | const char *kallsyms_filename = NULL; | 1830 | const char *kallsyms_filename = NULL; |
1831 | char *kallsyms_allocated_filename = NULL; | 1831 | char *kallsyms_allocated_filename = NULL; |
1832 | /* | 1832 | /* |
1833 | * Step 1: if the user specified a vmlinux filename, use it and only | 1833 | * Step 1: if the user specified a kallsyms or vmlinux filename, use |
1834 | * it, reporting errors to the user if it cannot be used. | 1834 | * it and only it, reporting errors to the user if it cannot be used. |
1835 | * | 1835 | * |
1836 | * For instance, try to analyse an ARM perf.data file _without_ a | 1836 | * For instance, try to analyse an ARM perf.data file _without_ a |
1837 | * build-id, or if the user specifies the wrong path to the right | 1837 | * 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, | |||
1844 | * validation in dso__load_vmlinux and will bail out if they don't | 1844 | * validation in dso__load_vmlinux and will bail out if they don't |
1845 | * match. | 1845 | * match. |
1846 | */ | 1846 | */ |
1847 | if (symbol_conf.kallsyms_name != NULL) { | ||
1848 | kallsyms_filename = symbol_conf.kallsyms_name; | ||
1849 | goto do_kallsyms; | ||
1850 | } | ||
1851 | |||
1847 | if (symbol_conf.vmlinux_name != NULL) { | 1852 | if (symbol_conf.vmlinux_name != NULL) { |
1848 | err = dso__load_vmlinux(self, map, | 1853 | err = dso__load_vmlinux(self, map, |
1849 | symbol_conf.vmlinux_name, filter); | 1854 | symbol_conf.vmlinux_name, filter); |