Patchwork [2/2] perf: Don't build backtrace for ARC

login
register
mail settings
Submitter Mischa Jonker
Date Jan. 28, 2014, 1:10 p.m.
Message ID <1390914658-18198-1-git-send-email-mjonker@synopsys.com>
Download mbox | patch
Permalink /patch/314719/
State Accepted
Headers show

Comments

Mischa Jonker - Jan. 28, 2014, 1:10 p.m.
Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
---
 package/perf/perf.mk |    4 ++++
 1 file changed, 4 insertions(+)
Thomas De Schampheleire - July 18, 2014, 8:16 p.m.
Hi Mischa,

On Tue, Jan 28, 2014 at 2:10 PM, Mischa Jonker
<Mischa.Jonker@synopsys.com> wrote:
> Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
> ---
>  package/perf/perf.mk |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/package/perf/perf.mk b/package/perf/perf.mk
> index ffe18bc..5628ba5 100644
> --- a/package/perf/perf.mk
> +++ b/package/perf/perf.mk
> @@ -22,6 +22,10 @@ PERF_MAKE_FLAGS = \
>         WERROR=0 \
>         ASCIIDOC=
>
> +ifeq ($(BR2_arc),y)
> +       PERF_MAKE_FLAGS += NO_BACKTRACE=1
> +endif
> +
>  ifeq ($(BR2_PACKAGE_ELFUTILS),y)
>         PERF_DEPENDENCIES += elfutils
>  else


Could you give more details as to why this is needed?
I see no autobuild failures for perf on ARC, so what is the problem here?
If this patch is still needed, I think the commit message should be
expanded for that.

Thanks,
Thomas
Thomas De Schampheleire - July 18, 2014, 8:23 p.m.
Anton,

Same for this mail, thanks.

On Fri, Jul 18, 2014 at 10:16 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> Hi Mischa,
>
> On Tue, Jan 28, 2014 at 2:10 PM, Mischa Jonker
> <Mischa.Jonker@synopsys.com> wrote:
>> Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
>> ---
>>  package/perf/perf.mk |    4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/package/perf/perf.mk b/package/perf/perf.mk
>> index ffe18bc..5628ba5 100644
>> --- a/package/perf/perf.mk
>> +++ b/package/perf/perf.mk
>> @@ -22,6 +22,10 @@ PERF_MAKE_FLAGS = \
>>         WERROR=0 \
>>         ASCIIDOC=
>>
>> +ifeq ($(BR2_arc),y)
>> +       PERF_MAKE_FLAGS += NO_BACKTRACE=1
>> +endif
>> +
>>  ifeq ($(BR2_PACKAGE_ELFUTILS),y)
>>         PERF_DEPENDENCIES += elfutils
>>  else
>
>
> Could you give more details as to why this is needed?
> I see no autobuild failures for perf on ARC, so what is the problem here?
> If this patch is still needed, I think the commit message should be
> expanded for that.
>
> Thanks,
> Thomas
Thomas Petazzoni - July 20, 2014, 10:19 a.m.
Dear Thomas De Schampheleire,

On Fri, 18 Jul 2014 22:16:44 +0200, Thomas De Schampheleire wrote:

> Could you give more details as to why this is needed?
> I see no autobuild failures for perf on ARC, so what is the problem here?

Since perf has 'depends on BR2_LINUX_KERNEL', it is never built by the
autobuilders.

Thomas
Anton Kolesov - July 21, 2014, 9:39 a.m.
Hi Thomas,

Call to backtrace() function fails for ARC, because for some reason unwinder from libgcc returns early. Thus usage of backtrace() should be disabled in perf explicitly, because build system only checks for existence of this call and since it is there it tries to use. However at runtime the output will not be the one expected: it will contain only several functions from the top of stack, instead of the complete backtrace.

> -----Original Message-----
> From: Thomas De Schampheleire [mailto:patrickdepinguin@gmail.com]
> Sent: 19 July 2014 00:24
> To: Anton Kolesov
> Cc: buildroot@busybox.net
> Subject: Re: [Buildroot] [PATCH 2/2] perf: Don't build backtrace for ARC
> 
> Anton,
> 
> Same for this mail, thanks.
> 
> On Fri, Jul 18, 2014 at 10:16 PM, Thomas De Schampheleire
> <patrickdepinguin@gmail.com> wrote:
> > Hi Mischa,
> >
> > On Tue, Jan 28, 2014 at 2:10 PM, Mischa Jonker
> > <Mischa.Jonker@synopsys.com> wrote:
> >> Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
> >> ---
> >>  package/perf/perf.mk |    4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/package/perf/perf.mk b/package/perf/perf.mk
> >> index ffe18bc..5628ba5 100644
> >> --- a/package/perf/perf.mk
> >> +++ b/package/perf/perf.mk
> >> @@ -22,6 +22,10 @@ PERF_MAKE_FLAGS = \
> >>         WERROR=0 \
> >>         ASCIIDOC=
> >>
> >> +ifeq ($(BR2_arc),y)
> >> +       PERF_MAKE_FLAGS += NO_BACKTRACE=1
> >> +endif
> >> +
> >>  ifeq ($(BR2_PACKAGE_ELFUTILS),y)
> >>         PERF_DEPENDENCIES += elfutils
> >>  else
> >
> >
> > Could you give more details as to why this is needed?
> > I see no autobuild failures for perf on ARC, so what is the problem here?
> > If this patch is still needed, I think the commit message should be
> > expanded for that.
> >
> > Thanks,
> > Thomas

Anton
Thomas Petazzoni - July 21, 2014, 8:55 p.m.
Dear Anton Kolesov,

Please fix your e-mail client to wrap lines at a reasonable length.
Thanks!

On Mon, 21 Jul 2014 09:39:05 +0000, Anton Kolesov wrote:

> Call to backtrace() function fails for ARC, because for some reason
> unwinder from libgcc returns early. Thus usage of backtrace() should
> be disabled in perf explicitly, because build system only checks for
> existence of this call and since it is there it tries to use. However
> at runtime the output will not be the one expected: it will contain
> only several functions from the top of stack, instead of the complete
> backtrace.

Thanks for this explanation. I've committed the patch after adding this
explanation right above the code that disables backtrace for perf on
ARC.

Thanks,

Thomas

Patch

diff --git a/package/perf/perf.mk b/package/perf/perf.mk
index ffe18bc..5628ba5 100644
--- a/package/perf/perf.mk
+++ b/package/perf/perf.mk
@@ -22,6 +22,10 @@  PERF_MAKE_FLAGS = \
 	WERROR=0 \
 	ASCIIDOC=
 
+ifeq ($(BR2_arc),y)
+	PERF_MAKE_FLAGS += NO_BACKTRACE=1
+endif
+
 ifeq ($(BR2_PACKAGE_ELFUTILS),y)
 	PERF_DEPENDENCIES += elfutils
 else