LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* alpha: undefined reference to `save_stack_trace'
@ 2008-10-31 16:57 Alexey Dobriyan
  2008-10-31 18:24 ` Al Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Dobriyan @ 2008-10-31 16:57 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

On alpha-smp-[ny]-debug-y:

  LD      .tmp_vmlinux1
kernel/built-in.o: In function `ftrace_trace_stack':
(.text+0x706fc): undefined reference to `save_stack_trace'


Somehow STACKTRACE is set despite no STACKTRACE_SUPPORT.

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

* Re: alpha: undefined reference to `save_stack_trace'
  2008-10-31 16:57 alpha: undefined reference to `save_stack_trace' Alexey Dobriyan
@ 2008-10-31 18:24 ` Al Viro
  2008-10-31 18:48   ` Al Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2008-10-31 18:24 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: mingo, linux-kernel

On Fri, Oct 31, 2008 at 07:57:51PM +0300, Alexey Dobriyan wrote:
> On alpha-smp-[ny]-debug-y:
> 
>   LD      .tmp_vmlinux1
> kernel/built-in.o: In function `ftrace_trace_stack':
> (.text+0x706fc): undefined reference to `save_stack_trace'
> 
> 
> Somehow STACKTRACE is set despite no STACKTRACE_SUPPORT.

select blows, film at 11.  TRACING blindly selects STACKTRACE, with a bunch
of stuff in kernel/tracing/Kconfig doing select of TRACING.  Not just an alpha
problem, BTW.

FWIW, we probably ought to make scripts/kconfig/conf check if dependencies
are satisfied before writing .config out and scream bloody murder if they
are not.

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

* Re: alpha: undefined reference to `save_stack_trace'
  2008-10-31 18:24 ` Al Viro
@ 2008-10-31 18:48   ` Al Viro
  2008-10-31 18:55     ` [PATCH] " Al Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2008-10-31 18:48 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: mingo, linux-kernel

On Fri, Oct 31, 2008 at 06:24:11PM +0000, Al Viro wrote:
> On Fri, Oct 31, 2008 at 07:57:51PM +0300, Alexey Dobriyan wrote:
> > On alpha-smp-[ny]-debug-y:
> > 
> >   LD      .tmp_vmlinux1
> > kernel/built-in.o: In function `ftrace_trace_stack':
> > (.text+0x706fc): undefined reference to `save_stack_trace'
> > 
> > 
> > Somehow STACKTRACE is set despite no STACKTRACE_SUPPORT.
> 
> select blows, film at 11.  TRACING blindly selects STACKTRACE, with a bunch
> of stuff in kernel/tracing/Kconfig doing select of TRACING.  Not just an alpha
> problem, BTW.

While we are at it, we have that particular turd on allmodconfigs on (at least)
	alpha
	blackfin
	cris
	frv
	h8300
	ia64
	m32r
	m68k
	m68knommu
	mn10300
	parisc
	sparc (32bit one, that is)
	uml/i386
	uml/amd64
	xtensa

We could slap && HAS_STACKTRACE_SUPPORT on all symbols that end up selecting
TRACING, but that's almost certainly wrong; the thing won't break if we
simply omit stack trace output on configs that do not have them supported.
Why do we have that select STACKTRACE there, anyway?

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

* [PATCH] Re: alpha: undefined reference to `save_stack_trace'
  2008-10-31 18:48   ` Al Viro
@ 2008-10-31 18:55     ` Al Viro
  2008-10-31 19:06       ` Al Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2008-10-31 18:55 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: mingo, linux-kernel

On Fri, Oct 31, 2008 at 06:48:22PM +0000, Al Viro wrote:
> On Fri, Oct 31, 2008 at 06:24:11PM +0000, Al Viro wrote:
> > On Fri, Oct 31, 2008 at 07:57:51PM +0300, Alexey Dobriyan wrote:
> > > On alpha-smp-[ny]-debug-y:
> > > 
> > >   LD      .tmp_vmlinux1
> > > kernel/built-in.o: In function `ftrace_trace_stack':
> > > (.text+0x706fc): undefined reference to `save_stack_trace'
> > > 
> > > 
> > > Somehow STACKTRACE is set despite no STACKTRACE_SUPPORT.
> > 
> > select blows, film at 11.  TRACING blindly selects STACKTRACE, with a bunch
> > of stuff in kernel/tracing/Kconfig doing select of TRACING.  Not just an alpha
> > problem, BTW.
> 
> While we are at it, we have that particular turd on allmodconfigs on (at least)
> 	alpha
> 	blackfin
> 	cris
> 	frv
> 	h8300
> 	ia64
> 	m32r
> 	m68k
> 	m68knommu
> 	mn10300
> 	parisc
> 	sparc (32bit one, that is)
> 	uml/i386
> 	uml/amd64
> 	xtensa
> 
> We could slap && HAS_STACKTRACE_SUPPORT on all symbols that end up selecting
> TRACING, but that's almost certainly wrong; the thing won't break if we
> simply omit stack trace output on configs that do not have them supported.
> Why do we have that select STACKTRACE there, anyway?

It's too ugly for words, but it does deal with this mess ;-/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index b58f43b..33dbefd 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -25,7 +25,7 @@ config TRACING
 	bool
 	select DEBUG_FS
 	select RING_BUFFER
-	select STACKTRACE
+	select STACKTRACE if STACKTRACE_SUPPORT
 	select TRACEPOINTS
 	select NOP_TRACER
 

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

* Re: [PATCH] Re: alpha: undefined reference to `save_stack_trace'
  2008-10-31 18:55     ` [PATCH] " Al Viro
@ 2008-10-31 19:06       ` Al Viro
  2008-10-31 19:50         ` Al Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2008-10-31 19:06 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: mingo, linux-kernel

On Fri, Oct 31, 2008 at 06:55:26PM +0000, Al Viro wrote:

> It's too ugly for words, but it does deal with this mess ;-/

... doesn't.  Unfortunately.

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

* Re: [PATCH] Re: alpha: undefined reference to `save_stack_trace'
  2008-10-31 19:06       ` Al Viro
@ 2008-10-31 19:50         ` Al Viro
  2008-10-31 20:05           ` Steven Rostedt
  0 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2008-10-31 19:50 UTC (permalink / raw)
  To: rostedt; +Cc: mingo, linux-kernel

On Fri, Oct 31, 2008 at 07:06:08PM +0000, Al Viro wrote:
> On Fri, Oct 31, 2008 at 06:55:26PM +0000, Al Viro wrote:
> 
> > It's too ugly for words, but it does deal with this mess ;-/
> 
> ... doesn't.  Unfortunately.

... since we also need to ifdef out the guts of ftrace_trace_stack().
We also want to disallow setting TRACE_ITER_STACKTRACE in trace_flags
on such configs, but that can wait.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index b58f43b..33dbefd 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -25,7 +25,7 @@ config TRACING
 	bool
 	select DEBUG_FS
 	select RING_BUFFER
-	select STACKTRACE
+	select STACKTRACE if STACKTRACE_SUPPORT
 	select TRACEPOINTS
 	select NOP_TRACER
 
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8a499e2..85bee77 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -705,6 +705,7 @@ static void ftrace_trace_stack(struct trace_array *tr,
 			       unsigned long flags,
 			       int skip, int pc)
 {
+#ifdef CONFIG_STACKTRACE
 	struct ring_buffer_event *event;
 	struct stack_entry *entry;
 	struct stack_trace trace;
@@ -730,6 +731,7 @@ static void ftrace_trace_stack(struct trace_array *tr,
 
 	save_stack_trace(&trace);
 	ring_buffer_unlock_commit(tr->buffer, event, irq_flags);
+#endif
 }
 
 void __trace_stack(struct trace_array *tr,

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

* Re: [PATCH] Re: alpha: undefined reference to `save_stack_trace'
  2008-10-31 19:50         ` Al Viro
@ 2008-10-31 20:05           ` Steven Rostedt
  2008-10-31 20:13             ` Al Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2008-10-31 20:05 UTC (permalink / raw)
  To: Al Viro; +Cc: mingo, linux-kernel


Ingo,

I guess this is needed to make alph (and perhasp others compile).
Can you get this ready for 2.6.28?


On Fri, 31 Oct 2008, Al Viro wrote:

> On Fri, Oct 31, 2008 at 07:06:08PM +0000, Al Viro wrote:
> > On Fri, Oct 31, 2008 at 06:55:26PM +0000, Al Viro wrote:
> > 
> > > It's too ugly for words, but it does deal with this mess ;-/
> > 
> > ... doesn't.  Unfortunately.
> 
> ... since we also need to ifdef out the guts of ftrace_trace_stack().
> We also want to disallow setting TRACE_ITER_STACKTRACE in trace_flags
> on such configs, but that can wait.
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Acked-by: Steven Rostedt <srostedt@redhat.com>

-- Steve


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

* Re: [PATCH] Re: alpha: undefined reference to `save_stack_trace'
  2008-10-31 20:05           ` Steven Rostedt
@ 2008-10-31 20:13             ` Al Viro
  2008-11-03  9:11               ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2008-10-31 20:13 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: mingo, linux-kernel

On Fri, Oct 31, 2008 at 04:05:01PM -0400, Steven Rostedt wrote:
> 
> Ingo,
> 
> I guess this is needed to make alph (and perhasp others compile).

... and shitloads more than alpha.  Itanic, parisc, all embedded ones,
m68k, uml, sparc32...

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

* Re: [PATCH] Re: alpha: undefined reference to `save_stack_trace'
  2008-10-31 20:13             ` Al Viro
@ 2008-11-03  9:11               ` Ingo Molnar
  0 siblings, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2008-11-03  9:11 UTC (permalink / raw)
  To: Al Viro; +Cc: Steven Rostedt, linux-kernel


* Al Viro <viro@ZenIV.linux.org.uk> wrote:

> On Fri, Oct 31, 2008 at 04:05:01PM -0400, Steven Rostedt wrote:
> > 
> > Ingo,
> > 
> > I guess this is needed to make alph (and perhasp others compile).
> 
> ... and shitloads more than alpha.  Itanic, parisc, all embedded ones,
> m68k, uml, sparc32...

queued it up in tip/tracing/urgent, thanks guys.

	Ingo

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

end of thread, other threads:[~2008-11-03  9:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-31 16:57 alpha: undefined reference to `save_stack_trace' Alexey Dobriyan
2008-10-31 18:24 ` Al Viro
2008-10-31 18:48   ` Al Viro
2008-10-31 18:55     ` [PATCH] " Al Viro
2008-10-31 19:06       ` Al Viro
2008-10-31 19:50         ` Al Viro
2008-10-31 20:05           ` Steven Rostedt
2008-10-31 20:13             ` Al Viro
2008-11-03  9:11               ` Ingo Molnar

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).