[lkml]   [2009]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH -tip perf/probes 00/10] x86 insn decoder bugfixes
Josh Stone wrote:
> On 10/29/2009 01:10 PM, Masami Hiramatsu wrote:
>> Masami Hiramatsu wrote:
>>> Ingo Molnar wrote:
>>>> Another problem i noticed is that a vmlinux without DEBUG_INFO will fail
>>>> in this way:
>>>> aldebaran:~/linux/linux> perf probe schedule
>>>> Fatal: Failed to call dwarf_init(). Maybe, not a dwarf file.
>>> Ah, really? I think I broke need_dwarf logic somehow...
>> Hmm, I've found that is for searching (implicitly) inlined symbols,
>> this means "the behavior is by (bad) design" :-(
>> I think it should be search the symbol in Elf (or kallsyms) first,
>> and only if it fails, use Dwarf for searching the symbol again.
>> Or, it may be enough that just trying to setup probe and if it fails
>> use Dwarf. This way doesn't require any vmlinux access.
> Just beware that functions can exist in the symbol table and as inlines
> at the same time. For example, we've seen compat_sys_recvmsg get
> inlined into compat_sys_socketcall, while it's still compiled as a
> standalone function too. So if you have the dwarf, you should still try
> to see if inlined versions exist.

Right, by default, perf-probe should see Dwarf since some static functions
may implicitly compiled as inline, and it is hard to request user checking
whether the symbol is inlined or not.

So, this means current design is not so bad, but practically, we'd better
provide an option which ignores inline functions. e.g. exported functions
will be always not-inlined.

Thank you,

Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division


 \ /
  Last update: 2009-10-29 21:45    [W:0.054 / U:1.732 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site