Messages in this thread | | | Subject | Re: [PATCH 2/5] ftrace: Use breakpoint method to update ftrace caller | From | Peter Zijlstra <> | Date | Thu, 31 May 2012 13:18:05 +0200 |
| |
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?
| |