diff options
author | Anton Blanchard <anton@samba.org> | 2014-09-15 15:57:56 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-09-17 16:08:10 -0400 |
commit | c657f423aed0d836c807ea1d6d8d28b3914446fa (patch) | |
tree | 3798869150cfa4b948346831874ba7d49cc753a9 /tools | |
parent | d0b0d0406fe6743e734e1ba780155f8db5f713e6 (diff) |
perf symbols: Add path to Ubuntu kernel debuginfo file
Ubuntu places the kernel debuginfo in /usr/lib/debug/boot/vmlinux-*
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
echo Link: http://lkml.kernel.org/n/tip-`ranpwd -l 24`@git.kernel.org
Link: http://lkml.kernel.org/r/20140909091152.2698c0f7@kryten
[ Adapted it to use the perf.data file kernel version as in 0a7e6d1b6844 ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/symbol.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 1adb143867e3..be84f7a9838b 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1757,7 +1757,7 @@ static int vmlinux_path__init(struct perf_session_env *env) | |||
1757 | char bf[PATH_MAX]; | 1757 | char bf[PATH_MAX]; |
1758 | char *kernel_version; | 1758 | char *kernel_version; |
1759 | 1759 | ||
1760 | vmlinux_path = malloc(sizeof(char *) * 5); | 1760 | vmlinux_path = malloc(sizeof(char *) * 6); |
1761 | if (vmlinux_path == NULL) | 1761 | if (vmlinux_path == NULL) |
1762 | return -1; | 1762 | return -1; |
1763 | 1763 | ||
@@ -1788,6 +1788,12 @@ static int vmlinux_path__init(struct perf_session_env *env) | |||
1788 | if (vmlinux_path[vmlinux_path__nr_entries] == NULL) | 1788 | if (vmlinux_path[vmlinux_path__nr_entries] == NULL) |
1789 | goto out_fail; | 1789 | goto out_fail; |
1790 | ++vmlinux_path__nr_entries; | 1790 | ++vmlinux_path__nr_entries; |
1791 | snprintf(bf, sizeof(bf), "/usr/lib/debug/boot/vmlinux-%s", | ||
1792 | kernel_version); | ||
1793 | vmlinux_path[vmlinux_path__nr_entries] = strdup(bf); | ||
1794 | if (vmlinux_path[vmlinux_path__nr_entries] == NULL) | ||
1795 | goto out_fail; | ||
1796 | ++vmlinux_path__nr_entries; | ||
1791 | snprintf(bf, sizeof(bf), "/lib/modules/%s/build/vmlinux", kernel_version); | 1797 | snprintf(bf, sizeof(bf), "/lib/modules/%s/build/vmlinux", kernel_version); |
1792 | vmlinux_path[vmlinux_path__nr_entries] = strdup(bf); | 1798 | vmlinux_path[vmlinux_path__nr_entries] = strdup(bf); |
1793 | if (vmlinux_path[vmlinux_path__nr_entries] == NULL) | 1799 | if (vmlinux_path[vmlinux_path__nr_entries] == NULL) |