[Lldb-commits] [PATCH] Profile Assembly Until Ret Instruction
tfiala at google.com
Tue Jul 29 16:17:18 PDT 2014
Do you have any feedback on this?
On Fri, Jul 25, 2014 at 1:42 PM, Tong Shen <endlessroad at google.com> wrote:
> Sorry, wrong version of patch...
> On Fri, Jul 25, 2014 at 1:41 PM, Tong Shen <endlessroad at google.com> wrote:
>> Hi Molenda, lldb-commits,
>> For now, x86 assembly profiler will stop after 10 "non-prologue"
>> instructions. In practice it may not be sufficient. For example, we have a
>> hand-written assembly function, which have hundreds of instruction before
>> actual (stack-adjusting) prologue instructions.
>> One way is to change the limit to 1000; but there will always be
>> functions that break the limit :-) I believe the right thing to do here is
>> parsing all instructions before "ret"/"call" as prologue instructions.
>> Here's what I changed:
>> - For "push %rbx" and "mov %rbx, -8(%rbp)": only add first row for that
>> register. They may appear multiple times in function body. But as long as
>> one of them appears, first appearance should be in prologue(If it's not in
>> prologue, this function will not use %rbx, so these 2 instructions should
>> not appear at all).
>> - Also monitor "add %rsp 0x20".
>> - Remove non prologue instruction count.
>> - Add "call" instruction detection, and stop parsing after it.
>> Best Regards, Tong Shen
> Best Regards, Tong Shen
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-commits