lkml.org 
[lkml]   [2011]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Use -m-omit-leaf-frame-pointer to shrink text size
On 12/16/2011 12:53 AM, Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
>
>> [...]
>>
>> The call-chains are still intact for quality backtraces and
>> for call-chain profiling (perf record -g), as the backtrace
>> walker can deduct the full backtrace from the RIP of a leaf
>> function and the parent chain.
> Hm, noticed one complication while looking at annotated assembly
> code in perf top. Code doing function calls from within asm() is
> incorrectly marked 'leaf' by GCC:
>
> ffffffff812b82d8 <arch_local_save_flags>:
> ffffffff812b82d8: ff 14 25 00 d9 c1 81 callq *0xffffffff81c1d900
> ffffffff812b82df: c3 retq
>
> So all the paravirt details will have to be fixed, so that GCC
> is able to see that there's a real function call done inside.
> Jeremy, Konrad?

Um. So the issue is that a function that contains only pvops looks like
it's a leaf to gcc and it does some leaf-function optimisation?

How can we tell gcc the asm contains a call, or otherwise suppress the
"leaf function" classification?

The alternative is to just make it a plain C-level indirect call, but
then we'd lose all the patching and callee-save optimisations.

Any suggestions?

Thanks,
J



\
 
 \ /
  Last update: 2011-12-16 10:25    [W:0.076 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site