lkml.org 
[lkml]   [2009]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] [PATCH 1/5] function-graph/x86: replace unbalanced ret with jmp
On Tue, Oct 13, 2009 at 04:33:50PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> The function graph tracer replaces the return address with a hook to
> trace the exit of the function call. This hook will finish by returning
> to the real location the function should return to.
>
> But the current implementation uses a ret to jump to the real return
> location. This causes a imbalance between calls and ret. That is
> the original function does a call, the ret goes to the handler
> and then the handler does a ret without a matching call.
>
> Although the function graph tracer itself still breaks the branch
> predictor by replacing the original ret, by using a second ret and
> causing an imbalance, it breaks the predictor even more.



I have troubles to understand by it breaks the predictor, especially
since there is not conditional branch in return_to_handler.
But still I don't understand why a ret would break more the branch
prediction than a jmp.



\
 
 \ /
  Last update: 2009-10-13 23:07    [W:0.093 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site