Re: CONFIG_DEBUG_INFO_SPLIT impacts on faddr2line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 13, 2017 at 10:52 AM, Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote:
>
> It works for me.

No it clearly does not.

> % ./linux/scripts/faddr2line obj/vmlinux schedule+10
> schedule+10/0x80:
> schedule at arch/x86/include/asm/current.h:15

That's obviously garbage and the problem.

Just look at it. It claims it is in "schedule()", at line 15 in the
file arch/x86/include/asm/current.h.

It's bullshit, and it's almost entirely useless, because while you see
which line it was, you have no idea how it got there, which can be a
big problem particularly with the trivial inlines. _Which_ of the
different invocations of some atomic update was it?

The _real_ output is supposed to be like this:

   [torvalds@i7 linux]$ ./scripts/faddr2line vmlinux __schedule+0x314
   __schedule+0x314/0x840:
   rq_sched_info_arrive at kernel/sched/stats.h:12
    (inlined by) sched_info_arrive at kernel/sched/stats.h:99
    (inlined by) __sched_info_switch at kernel/sched/stats.h:151
    (inlined by) sched_info_switch at kernel/sched/stats.h:158
    (inlined by) prepare_task_switch at kernel/sched/core.c:2582
    (inlined by) context_switch at kernel/sched/core.c:2755
    (inlined by) __schedule at kernel/sched/core.c:3366

See how now it knows that __schedule is in kernel/sched/core.c, and
how it has inlined things and just how it ended up in that header file
and which inline function it was.

So your addr2line is equally broken, and doesn't give the right information.

Put another way: the CONFIG_DEBUG_INFO_SPLIT option is useless. Yes,
it saves time and disk space, but does so at the expense of making all
the debug information unavailable to basic tools.

             Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux