[lkml]   [2010]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH][GIT PULL] ftrace: Rename config option HAVE_C_MCOUNT_RECORD to HAVE_C_RECORDMCOUNT
    On Fri, 2010-10-15 at 09:38 +0200, Ingo Molnar wrote:
    > FYI, a recent tracing change causes this new warning on latest -tip:
    > Freeing SMP alternatives: 20k freed
    > ftrace: allocating 14134 entries in 28 pages
    > ------------[ cut here ]------------
    > WARNING: at kernel/trace/ftrace.c:1006 ftrace_bug+0x94/0x1f9()
    > Hardware name: System Product Name
    > Modules linked in:
    > Pid: 0, comm: swapper Not tainted 2.6.36-rc8-tip+ #49604
    > Call Trace:
    > [<c102c224>] warn_slowpath_common+0x6a/0x7f
    > [<c10629f3>] ? ftrace_bug+0x94/0x1f9
    > [<c10633d8>] ? ftrace_process_locs+0x152/0x225
    > [<c102c24d>] warn_slowpath_null+0x14/0x18
    > [<c10629f3>] ftrace_bug+0x94/0x1f9
    > [<c1063404>] ftrace_process_locs+0x17e/0x225
    > [<c10633d8>] ? ftrace_process_locs+0x152/0x225
    > [<c13fd7b4>] ftrace_init+0x112/0x12a
    > [<c13ed7ca>] start_kernel+0x287/0x291
    > [<c13ed079>] i386_start_kernel+0x79/0x7b
    > ---[ end trace 4eaa2a86a8e2da22 ]---
    > ftrace failed to modify [<c10633d8>] ftrace_process_locs+0x152/0x225

    I know exactly what happened here, and it has to be because of the C
    recordmcount code, because the perl version will not process a file
    called ftrace.o

    What happened is that ftrace_process_locs() references the mcount call,
    and since we are adding relocations of mcount to the __mcount_loc
    section, we just added a place that references the call but does not
    actually call mcount. So we fail the check when we try to modify a
    caller to mcount.

    I'll see if I can add a fix to that in the code.

    -- Steve

    > actual: b9:44:2b:00:c1
    > Enabling APIC mode: Flat. Using 1 I/O APICs
    > enabled ExtINT on CPU#0
    > (it booted up fine after this)
    > Candidates would be:
    > 0fdf136: Merge branch 'tip/perf/recordmcount-2' of git:// into perf/core
    > cf4db25: ftrace: Rename config option HAVE_C_MCOUNT_RECORD to HAVE_C_RECORDMCOUNT
    > d9d572a: Merge branch 'perf/core' of git:// into perf/core
    > c28d507: ftrace: Remove duplicate code for 64 and 32 bit in recordmcount.c
    > 72441cb: ftrace/x86: Add support for C version of recordmcount
    > 81d3858: ftrace: Add C version of recordmcount compile time code
    > ebc8827: x86: Barf when vmalloc and kmemcheck faults happen in NMI
    > 3cba11d: kconfig/x86: Add HAVE_TEXT_POKE_SMP config for stop_machine dependency
    > 3caa375: x86: Use __stop_machine() in text_poke_smp()
    > 087a4eb: stopmachine: Define __stop_machine when CONFIG_STOP_MACHINE=n
    > fd02e6f: kprobes: Fix selftest to clear flags field for reusing probes
    > 0f55a2f: kprobes: Update document about irq disabled state in kprobe handler
    > Config attached.
    > Gut feeling suggests that it's the new in-C recordmcount code causing
    > this bug.
    > Thanks,
    > Ingo

     \ /
      Last update: 2010-10-15 15:43    [W:0.026 / U:4.632 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site