lkml.org 
[lkml]   [2012]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/5] ftrace: Use breakpoint method to update ftrace caller
From
Date
On Wed, 2012-05-30 at 21:28 -0400, Steven Rostedt wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> On boot up and module load, it is fine to modify the code directly,
> without the use of breakpoints. This is because boot up modification
> is done before SMP is initialized, thus the modification is serial,
> and module load is done before the module executes.
>
> But after that we must use a SMP safe method to modify running code.
>
> This has been done to change the nops at all the functions, but
> the change of the ftrace callback handler itself was still using a
> direct modification. If tracing was enabled and the function callback
> was changed then another CPU could fault if it was currently calling
> the original callback. This modification must use the breakpoint method
> too.
>
> Note, the direct method is still used for boot up and module load.

The changelog isn't clear if this is a fix or optimization. I suspect
the latter.

Still, you're now re-inventing text_poke() and text_poke_early().

Why are you keeping all this inside of ftrace?




\
 
 \ /
  Last update: 2012-05-31 14:01    [W:0.588 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site