linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf symbols: Add path to Ubuntu kernel debuginfo file
@ 2014-09-08 23:11 Anton Blanchard
  2014-09-12  6:43 ` Namhyung Kim
  2014-09-19  5:22 ` [tip:perf/core] " tip-bot for Anton Blanchard
  0 siblings, 2 replies; 4+ messages in thread
From: Anton Blanchard @ 2014-09-08 23:11 UTC (permalink / raw)
  To: acme, a.p.zijlstra, paulus, mingo, linux-kernel

Ubuntu places the kernel debuginfo in /usr/lib/debug/boot/vmlinux-*

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: b/tools/perf/util/symbol.c
===================================================================
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -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;
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf symbols: Add path to Ubuntu kernel debuginfo file
  2014-09-08 23:11 [PATCH] perf symbols: Add path to Ubuntu kernel debuginfo file Anton Blanchard
@ 2014-09-12  6:43 ` Namhyung Kim
  2014-09-15 19:57   ` Arnaldo Carvalho de Melo
  2014-09-19  5:22 ` [tip:perf/core] " tip-bot for Anton Blanchard
  1 sibling, 1 reply; 4+ messages in thread
From: Namhyung Kim @ 2014-09-12  6:43 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: acme, a.p.zijlstra, paulus, mingo, linux-kernel

On Tue, 9 Sep 2014 09:11:52 +1000, Anton Blanchard wrote:
> Ubuntu places the kernel debuginfo in /usr/lib/debug/boot/vmlinux-*
>
> Signed-off-by: Anton Blanchard <anton@samba.org>

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


> ---
>
> Index: b/tools/perf/util/symbol.c
> ===================================================================
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -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;
>  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf symbols: Add path to Ubuntu kernel debuginfo file
  2014-09-12  6:43 ` Namhyung Kim
@ 2014-09-15 19:57   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-15 19:57 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: Anton Blanchard, a.p.zijlstra, paulus, mingo, linux-kernel

Em Fri, Sep 12, 2014 at 03:43:28PM +0900, Namhyung Kim escreveu:
> On Tue, 9 Sep 2014 09:11:52 +1000, Anton Blanchard wrote:
> > Ubuntu places the kernel debuginfo in /usr/lib/debug/boot/vmlinux-*
> >
> > Signed-off-by: Anton Blanchard <anton@samba.org>
> 
> 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
 
> Thanks,
> Namhyung
> 
> 
> > ---
> >
> > Index: b/tools/perf/util/symbol.c
> > ===================================================================
> > --- a/tools/perf/util/symbol.c
> > +++ b/tools/perf/util/symbol.c
> > @@ -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;
> >  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:perf/core] perf symbols: Add path to Ubuntu kernel debuginfo file
  2014-09-08 23:11 [PATCH] perf symbols: Add path to Ubuntu kernel debuginfo file Anton Blanchard
  2014-09-12  6:43 ` Namhyung Kim
@ 2014-09-19  5:22 ` tip-bot for Anton Blanchard
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Anton Blanchard @ 2014-09-19  5:22 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, paulus, anton, hpa, mingo, peterz, namhyung,
	jolsa, tglx

Commit-ID:  c657f423aed0d836c807ea1d6d8d28b3914446fa
Gitweb:     http://git.kernel.org/tip/c657f423aed0d836c807ea1d6d8d28b3914446fa
Author:     Anton Blanchard <anton@samba.org>
AuthorDate: Mon, 15 Sep 2014 16:57:56 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
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-*

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>
---
 tools/perf/util/symbol.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 1adb143..be84f7a 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)
 	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)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-19  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 23:11 [PATCH] perf symbols: Add path to Ubuntu kernel debuginfo file Anton Blanchard
2014-09-12  6:43 ` Namhyung Kim
2014-09-15 19:57   ` Arnaldo Carvalho de Melo
2014-09-19  5:22 ` [tip:perf/core] " tip-bot for Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).