Commit c657f423 authored by Anton Blanchard's avatar Anton Blanchard Committed by Arnaldo Carvalho de Melo

perf symbols: Add path to Ubuntu kernel debuginfo file

Ubuntu places the kernel debuginfo in /usr/lib/debug/boot/vmlinux-*
Signed-off-by: default avatarAnton 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 0a7e6d1b ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d0b0d040
...@@ -1757,7 +1757,7 @@ static int vmlinux_path__init(struct perf_session_env *env) ...@@ -1757,7 +1757,7 @@ static int vmlinux_path__init(struct perf_session_env *env)
char bf[PATH_MAX]; char bf[PATH_MAX];
char *kernel_version; char *kernel_version;
vmlinux_path = malloc(sizeof(char *) * 5); vmlinux_path = malloc(sizeof(char *) * 6);
if (vmlinux_path == NULL) if (vmlinux_path == NULL)
return -1; return -1;
...@@ -1788,6 +1788,12 @@ static int vmlinux_path__init(struct perf_session_env *env) ...@@ -1788,6 +1788,12 @@ static int vmlinux_path__init(struct perf_session_env *env)
if (vmlinux_path[vmlinux_path__nr_entries] == NULL) if (vmlinux_path[vmlinux_path__nr_entries] == NULL)
goto out_fail; goto out_fail;
++vmlinux_path__nr_entries; ++vmlinux_path__nr_entries;
snprintf(bf, sizeof(bf), "/usr/lib/debug/boot/vmlinux-%s",
kernel_version);
vmlinux_path[vmlinux_path__nr_entries] = strdup(bf);
if (vmlinux_path[vmlinux_path__nr_entries] == NULL)
goto out_fail;
++vmlinux_path__nr_entries;
snprintf(bf, sizeof(bf), "/lib/modules/%s/build/vmlinux", kernel_version); snprintf(bf, sizeof(bf), "/lib/modules/%s/build/vmlinux", kernel_version);
vmlinux_path[vmlinux_path__nr_entries] = strdup(bf); vmlinux_path[vmlinux_path__nr_entries] = strdup(bf);
if (vmlinux_path[vmlinux_path__nr_entries] == NULL) if (vmlinux_path[vmlinux_path__nr_entries] == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment