perf symbols: Add path to Ubuntu kernel debuginfo file
PATCH 1/1 perf symbols: Add path to Ubuntu kernel debuginfo file
Ubuntu places the kernel debuginfo in /usr/lib/debug/boot/vmlinux-*
---
tools/perf/util/symbol.c +7 -1
@@ -1750,7 +1750,7 @@ static int vmlinux_path__init(void)struct utsname uts;char bf[PATH_MAX ]; - vmlinux_path =malloc (sizeof (char *) *5 ); + vmlinux_path =malloc (sizeof (char *) *6 );if (vmlinux_path ==NULL )return -1 ;
@@ -1784,6 +1784,12 @@ static int vmlinux_path__init(void) uts.release); 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),"/usr/lib/debug/boot/vmlinux-%s" , + uts.release); + vmlinux_path[vmlinux_path__nr_entries] =strdup (bf); +if (vmlinux_path[vmlinux_path__nr_entries] ==NULL ) goto out_fail; ++vmlinux_path__nr_entries;
Namhyung Kim
maintainerQuoted 3 lines · Anton Blanchard
Ubuntu places the kernel debuginfo in
/usr/lib/debug/boot/vmlinux-*Signed-off-by Anton Blanchard <[email protected]>
It seems that you need to rebase it onto current acme/perf/core as there're little change in this area. The patch itself looks good to me.
Thanks,
Namhyung
Quoted 28 lines
---
Index:
b/tools/perf/util/symbol.c
===================================================================tools/perf/util/symbol.c +7
-1@@ -1750,7 +1750,7 @@ static int vmlinux_path__init(void)struct utsname uts;char bf[PATH_MAX ]; - vmlinux_path =malloc (sizeof (char *) *5 ); + vmlinux_path =malloc (sizeof (char *) *6 );if (vmlinux_path ==NULL )return -1 ;@@ -1784,6 +1784,12 @@ static int vmlinux_path__init(void) uts.release); 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),"/usr/lib/debug/boot/vmlinux-%s" , + uts.release); + vmlinux_path[vmlinux_path__nr_entries] =strdup (bf); +if (vmlinux_path[vmlinux_path__nr_entries] ==NULL ) goto out_fail; ++vmlinux_path__nr_entries;
Em Fri, Sep 12, 2014 at 03:43:28PM +0900, Namhyung Kim escreveu:
Quoted 7 lines · Anton Blanchard
Quoted 3 lines
Ubuntu places the kernel debuginfo in
/usr/lib/debug/boot/vmlinux-*Signed-off-by Anton Blanchard <[email protected]>It seems that you need to rebase it onto current acme/perf/core as there're little change in this area. The patch itself looks good to me.
I updated the patch, to make it use the kernel_version from the perf.data file if present, else it uses uts.release as in Anton's patch, ok?
- Arnaldo
Quoted 32 lines
Thanks,
NamhyungQuoted 28 lines
---
Index:
b/tools/perf/util/symbol.c
===================================================================tools/perf/util/symbol.c +7
-1@@ -1750,7 +1750,7 @@ static int vmlinux_path__init(void)struct utsname uts;char bf[PATH_MAX ]; - vmlinux_path =malloc (sizeof (char *) *5 ); + vmlinux_path =malloc (sizeof (char *) *6 );if (vmlinux_path ==NULL )return -1 ;@@ -1784,6 +1784,12 @@ static int vmlinux_path__init(void) uts.release); 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),"/usr/lib/debug/boot/vmlinux-%s" , + uts.release); + vmlinux_path[vmlinux_path__nr_entries] =strdup (bf); +if (vmlinux_path[vmlinux_path__nr_entries] ==NULL ) goto out_fail; ++vmlinux_path__nr_entries;
tip-bot for Anton Blanchard
merge botperf symbols: Add path to Ubuntu kernel debuginfo file
Commit-ID: c657f423aed0d836c807ea1d6d8d28b3914446fa Gitweb: http://git.kernel.org/tip/c657f423aed0d836c807ea1d6d8d28b3914446fa Author: Anton Blanchard <[email protected]> AuthorDate: Mon, 15 Sep 2014 16:57:56 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 17 Sep 2014 17:08:10 -0300
perf symbols: Add path to Ubuntu kernel debuginfo file
Ubuntu places the kernel debuginfo in /usr/lib/debug/boot/vmlinux-*
echo Link: http://lkml.kernel.org/n/tip-ranpwd -l 24@git.kernel.org
--- tools/perf/util/symbol.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
tools/perf/util/symbol.c +7 -1
@@ -1757,7 +1757,7 @@ static int vmlinux_path__init(struct perf_session_env *env)char bf[PATH_MAX ];char *kernel_version; - vmlinux_path =malloc (sizeof (char *) *5 ); + vmlinux_path =malloc (sizeof (char *) *6 );if (vmlinux_path ==NULL )return -1 ;
@@ -1788,6 +1788,12 @@ static int vmlinux_path__init(struct perf_session_env *env)if (vmlinux_path[vmlinux_path__nr_entries] ==NULL ) goto out_fail; ++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); vmlinux_path[vmlinux_path__nr_entries] =strdup (bf);if (vmlinux_path[vmlinux_path__nr_entries] ==NULL )