Re: -tip build failure: trace_clock_global undefined

From: Ingo Molnar
Date: Tue Apr 14 2009 - 04:33:17 EST



* Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:

> I'm seeing linker errors:
>
> LD .tmp_vmlinux1
> arch/x86/kernel/built-in.o: In function `ds_take_timestamp':
> /home/jeremy/git/linux/arch/x86/kernel/ds.c:1380: undefined reference to `trace_clock_global'
> /home/jeremy/git/linux/arch/x86/kernel/ds.c:1380: undefined reference to `trace_clock_global'
> make[2]: *** [.tmp_vmlinux1] Error 1
> make[1]: *** [sub-make] Error 2
> make: *** [all] Error 2
>
>
> .config attached.

Thanks - i pushed out the fix into latest -tip, please re-check it
works fine for you.

Steve: the reason why randconfig testing had little chance to find
this was that to trigger the build failure one needs:

CONFIG_X86_DS=y
CONFIG_X86_PTRACE_BTS=y
# CONFIG_FUNCTION_TRACER is not set
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set
# CONFIG_SYSPROF_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_CONTEXT_SWITCH_TRACER is not set
# CONFIG_EVENT_TRACER is not set
# CONFIG_FTRACE_SYSCALLS is not set
# CONFIG_BOOT_TRACER is not set
# CONFIG_TRACE_BRANCH_PROFILING is not set
# CONFIG_POWER_TRACER is not set
# CONFIG_STACK_TRACER is not set
# CONFIG_HW_BRANCH_TRACER is not set
# CONFIG_KMEMTRACE is not set
# CONFIG_WORKQUEUE_TRACER is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_MMIOTRACE is not set

It can be seen that this needs 2^17 - in excess of 100,000
randconfig steps to have a 50% chance of discovery. In the window of
breakage so far i did 10,000-20,000 randconfig builds so i had no
realistic chance to see this.

But the real problem is the flatness of the Kconfig space here and
the loss of a global switch over tracing: IMO we should have a
global interactive control over CONFIG_TRACING. It's clearly
something users want and do (like Jeremy did).

We already have a "Tracers" sub-menu under "Kernel Hacking" - it
should also be dependent on an interactive switch.

( that switch can be default-y so this wont impact visiblity - but
it will sure improve configurability and testability. )

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/