public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Don't profile branches in arm's boot decompressor
@ 2009-02-27 21:09 Uwe Kleine-König
  2009-02-27 21:19 ` Daniel Walker
  2009-02-27 21:44 ` Steven Rostedt
  0 siblings, 2 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2009-02-27 21:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt, Ingo Molnar

This fixes many compile errors for arch/arm/boot/compressed/misc.c of
the type:

	arch/arm/boot/compressed/misc.c:127: error: section attribute cannot be specified for local variables

Fix was suggested by Steven Rostedt in #linux-rt.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Steven Rostedt <rostedt@home.goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>

---
 arch/arm/boot/compressed/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index fbe5eef..0bcc98c 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -89,7 +89,7 @@ LDFLAGS_vmlinux += -p --no-undefined -X \
 
 # Don't allow any static data in misc.o, which
 # would otherwise mess up our GOT table
-CFLAGS_misc.o := -Dstatic=
+CFLAGS_misc.o := -Dstatic= -DDISABLE_BRANCH_PROFILING
 
 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
 	 	$(addprefix $(obj)/, $(OBJS)) FORCE
-- 
tg: (db50eec..) t/ftrace/fix-PROFILE_ALL_BRANCHES (depends on: tip/master)

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

* Re: [PATCH] Don't profile branches in arm's boot decompressor
  2009-02-27 21:09 [PATCH] Don't profile branches in arm's boot decompressor Uwe Kleine-König
@ 2009-02-27 21:19 ` Daniel Walker
  2009-02-27 21:28   ` Uwe Kleine-König
  2009-02-27 21:40   ` Steven Rostedt
  2009-02-27 21:44 ` Steven Rostedt
  1 sibling, 2 replies; 7+ messages in thread
From: Daniel Walker @ 2009-02-27 21:19 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel, Steven Rostedt, Ingo Molnar

On Fri, 2009-02-27 at 22:09 +0100, Uwe Kleine-König wrote:
> This fixes many compile errors for arch/arm/boot/compressed/misc.c of
> the type:
> 
> 	arch/arm/boot/compressed/misc.c:127: error: section attribute cannot be specified for local variables

Why do you think this error showed up just in that one file? It looks
like the branch tracer puts section tags on non-globals all over the
kernel..

Daniel


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

* Re: [PATCH] Don't profile branches in arm's boot decompressor
  2009-02-27 21:19 ` Daniel Walker
@ 2009-02-27 21:28   ` Uwe Kleine-König
  2009-02-27 21:38     ` Daniel Walker
  2009-02-27 21:40   ` Steven Rostedt
  1 sibling, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2009-02-27 21:28 UTC (permalink / raw)
  To: Daniel Walker; +Cc: linux-kernel, Steven Rostedt, Ingo Molnar

Hi Daniel,

On Fri, Feb 27, 2009 at 01:19:47PM -0800, Daniel Walker wrote:
> On Fri, 2009-02-27 at 22:09 +0100, Uwe Kleine-König wrote:
> > This fixes many compile errors for arch/arm/boot/compressed/misc.c of
> > the type:
> > 
> > 	arch/arm/boot/compressed/misc.c:127: error: section attribute cannot be specified for local variables
> 
> Why do you think this error showed up just in that one file? It looks
> like the branch tracer puts section tags on non-globals all over the
> kernel..
With this patch I was able to compile an ARM kernel with profiling
enabled.  Is that enough justification?

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

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

* Re: [PATCH] Don't profile branches in arm's boot decompressor
  2009-02-27 21:28   ` Uwe Kleine-König
@ 2009-02-27 21:38     ` Daniel Walker
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Walker @ 2009-02-27 21:38 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel, Steven Rostedt, Ingo Molnar

On Fri, 2009-02-27 at 22:28 +0100, Uwe Kleine-König wrote:
> Hi Daniel,
> 
> On Fri, Feb 27, 2009 at 01:19:47PM -0800, Daniel Walker wrote:
> > On Fri, 2009-02-27 at 22:09 +0100, Uwe Kleine-König wrote:
> > > This fixes many compile errors for arch/arm/boot/compressed/misc.c of
> > > the type:
> > > 
> > > 	arch/arm/boot/compressed/misc.c:127: error: section attribute cannot be specified for local variables
> > 
> > Why do you think this error showed up just in that one file? It looks
> > like the branch tracer puts section tags on non-globals all over the
> > kernel..
> With this patch I was able to compile an ARM kernel with profiling
> enabled.  Is that enough justification?

I'm not asking for any sort of justification .. I'm just wondering if
you know why that error is showing up there and not in other places..

Daniel


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

* Re: [PATCH] Don't profile branches in arm's boot decompressor
  2009-02-27 21:19 ` Daniel Walker
  2009-02-27 21:28   ` Uwe Kleine-König
@ 2009-02-27 21:40   ` Steven Rostedt
  1 sibling, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2009-02-27 21:40 UTC (permalink / raw)
  To: Daniel Walker
  Cc: Uwe Kleine-König, linux-kernel, Steven Rostedt, Ingo Molnar


On Fri, 27 Feb 2009, Daniel Walker wrote:

> On Fri, 2009-02-27 at 22:09 +0100, Uwe Kleine-K?nig wrote:
> > This fixes many compile errors for arch/arm/boot/compressed/misc.c of
> > the type:
> > 
> > 	arch/arm/boot/compressed/misc.c:127: error: section attribute cannot be specified for local variables
> 
> Why do you think this error showed up just in that one file? It looks
> like the branch tracer puts section tags on non-globals all over the
> kernel..

The problem was with the -Dstatic= in the CFLAGS of the boot parameters. 
Since the branch profiler requires a static variable in the section, this 
would simply fail. That was the issue, and the solution was to disable the 
branch profiler for the boot code. No need for it there anyway.

-- Steve


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

* Re: [PATCH] Don't profile branches in arm's boot decompressor
  2009-02-27 21:09 [PATCH] Don't profile branches in arm's boot decompressor Uwe Kleine-König
  2009-02-27 21:19 ` Daniel Walker
@ 2009-02-27 21:44 ` Steven Rostedt
  2009-02-28  6:12   ` Uwe Kleine-König
  1 sibling, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2009-02-27 21:44 UTC (permalink / raw)
  To: Uwe Kleine-K??nig; +Cc: linux-kernel, Steven Rostedt, Ingo Molnar

Thanks Uwe!



On Fri, Feb 27, 2009 at 10:09:43PM +0100, Uwe Kleine-K??nig wrote:
> This fixes many compile errors for arch/arm/boot/compressed/misc.c of
> the type:
> 
> 	arch/arm/boot/compressed/misc.c:127: error: section attribute cannot be specified for local variables
> 
> Fix was suggested by Steven Rostedt in #linux-rt.
> 
> Signed-off-by: Uwe Kleine-K??nig <u.kleine-koenig@pengutronix.de>
> Cc: Steven Rostedt <rostedt@home.goodmis.org>
> Cc: Ingo Molnar <mingo@elte.hu>
> 
> ---
>  arch/arm/boot/compressed/Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> index fbe5eef..0bcc98c 100644
> --- a/arch/arm/boot/compressed/Makefile
> +++ b/arch/arm/boot/compressed/Makefile
> @@ -89,7 +89,7 @@ LDFLAGS_vmlinux += -p --no-undefined -X \
>  
>  # Don't allow any static data in misc.o, which
>  # would otherwise mess up our GOT table
> -CFLAGS_misc.o := -Dstatic=
> +CFLAGS_misc.o := -Dstatic= -DDISABLE_BRANCH_PROFILING

Could you also add a comment saying something to the effect:

# The branch profiler requires static variables.
# No need to profile the boot up code, so simply disable it.

Thanks,

-- Steve

>  
>  $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
>  	 	$(addprefix $(obj)/, $(OBJS)) FORCE
> -- 
> tg: (db50eec..) t/ftrace/fix-PROFILE_ALL_BRANCHES (depends on: tip/master)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* [PATCH] Don't profile branches in arm's boot decompressor
  2009-02-27 21:44 ` Steven Rostedt
@ 2009-02-28  6:12   ` Uwe Kleine-König
  0 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2009-02-28  6:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt, Ingo Molnar, Daniel Walker

This fixes many compile errors for arch/arm/boot/compressed/misc.c of
the type:

	arch/arm/boot/compressed/misc.c:127: error: section attribute cannot be specified for local variables

The problem is that the branch profiler requires static variables and
arch/arm/boot/compressed/misc.c is compiled with "-Dstatic=".  Anyhow,
there is no big win in profiling boot up code, so simply disable it.

Fix was suggested by Steven Rostedt in #linux-rt.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Steven Rostedt <rostedt@home.goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Daniel Walker <dwalker@fifo99.com>
---
 arch/arm/boot/compressed/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index fbe5eef..0bcc98c 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -89,7 +89,7 @@ LDFLAGS_vmlinux += -p --no-undefined -X \
 
 # Don't allow any static data in misc.o, which
 # would otherwise mess up our GOT table
-CFLAGS_misc.o := -Dstatic=
+CFLAGS_misc.o := -Dstatic= -DDISABLE_BRANCH_PROFILING
 
 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
 	 	$(addprefix $(obj)/, $(OBJS)) FORCE
-- 
tg: (db50eec..) t/ftrace/fix-PROFILE_ALL_BRANCHES (depends on: tip/master)

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

end of thread, other threads:[~2009-02-28  6:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 21:09 [PATCH] Don't profile branches in arm's boot decompressor Uwe Kleine-König
2009-02-27 21:19 ` Daniel Walker
2009-02-27 21:28   ` Uwe Kleine-König
2009-02-27 21:38     ` Daniel Walker
2009-02-27 21:40   ` Steven Rostedt
2009-02-27 21:44 ` Steven Rostedt
2009-02-28  6:12   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox