Skip to contentSkip to conversation

alpha: undefined reference to `save_stack_trace'

DISCUSSION Applied Alexey Dobriyan 4 participants 9 messages Oct 31, 2008 – Nov 3, 2008 Tracing

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 8 lines · Alexey Dobriyan

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.

#2 lore raw
Quoted 8 lines · Al Viro
Quoted 7 lines · Alexey Dobriyan

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'

Quoted 5 lines
Quoted 1 line

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?

#3 lore raw
Quoted 32 lines · Al Viro
Quoted 8 lines · Al Viro
Quoted 7 lines · Alexey Dobriyan

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'

Quoted 5 lines
Quoted 1 line

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
Quoted 4 lines

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 ;-/

---

kernel/trace/Kconfig +1 -1
index b58f43b..33dbefd 100644
@@ -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
 
#4 lore raw
Quoted 1 line · Al Viro

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

... doesn't. Unfortunately.

#5 lore raw
Quoted 5 lines · Al Viro
Quoted 1 line · Al Viro

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.

---

kernel/trace/Kconfig +1 -1
index b58f43b..33dbefd 100644
@@ -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
 
kernel/trace/trace.c +2 -0
index 8a499e2..85bee77 100644
@@ -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,
maintainer Acked-by
#6 lore raw

Ingo,

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

Quoted 5 lines · Al Viro
Quoted 4 lines · Al Viro
Quoted 1 line · Al Viro

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

Quoted 7 lines
Quoted 1 line

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

-- Steve

#7 lore raw
Quoted 4 lines · Steven Rostedt

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

Applied
#8 lore raw
Quoted 8 lines · Al Viro
Quoted 4 lines · Steven Rostedt

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