Re: [PATCH 5/6] x86: patch all traced function calls using the int3-based framework

2013-10-18 Thread Steven Rostedt
On Fri, 18 Oct 2013 16:27:24 +0200 Petr Mladek wrote: > void ftrace_replace_code(int enable) > { > struct ftrace_rec_iter *iter; > struct dyn_ftrace *rec; > - const char *report = "adding breakpoints"; > - int count = 0; > - int ret; > + unsigned long *addr = NULL;

Re: [PATCH 5/6] x86: patch all traced function calls using the int3-based framework

2013-10-18 Thread Steven Rostedt
On Fri, 18 Oct 2013 10:55:57 -0400 Steven Rostedt wrote: > On Fri, 18 Oct 2013 16:27:24 +0200 > Petr Mladek wrote: > > > > +/* > > + * We do not want to replace ftrace calls one by one because syncing all > > CPUs > > + * is quite expensive. > > + * > > + * On the other hand, we do not want

Re: [PATCH 5/6] x86: patch all traced function calls using the int3-based framework

2013-10-18 Thread Steven Rostedt
On Fri, 18 Oct 2013 16:27:24 +0200 Petr Mladek wrote: > +/* > + * We do not want to replace ftrace calls one by one because syncing all CPUs > + * is quite expensive. > + * > + * On the other hand, we do not want to modify all calls at once because > + * the buffers for text_poke_bp might be

[PATCH 5/6] x86: patch all traced function calls using the int3-based framework

2013-10-18 Thread Petr Mladek
Let's continue with replacing the existing Int3-based framewok in ftrace with the new generic function introduced by the commit fd4363fff3d9 (x86: Introduce int3 (breakpoint)-based instruction patching) This time use it in ftrace_replace_code that modifies all the watched function calls. If we

[PATCH 5/6] x86: patch all traced function calls using the int3-based framework

2013-10-18 Thread Petr Mladek
Let's continue with replacing the existing Int3-based framewok in ftrace with the new generic function introduced by the commit fd4363fff3d9 (x86: Introduce int3 (breakpoint)-based instruction patching) This time use it in ftrace_replace_code that modifies all the watched function calls. If we

Re: [PATCH 5/6] x86: patch all traced function calls using the int3-based framework

2013-10-18 Thread Steven Rostedt
On Fri, 18 Oct 2013 16:27:24 +0200 Petr Mladek pmla...@suse.cz wrote: +/* + * We do not want to replace ftrace calls one by one because syncing all CPUs + * is quite expensive. + * + * On the other hand, we do not want to modify all calls at once because + * the buffers for text_poke_bp

Re: [PATCH 5/6] x86: patch all traced function calls using the int3-based framework

2013-10-18 Thread Steven Rostedt
On Fri, 18 Oct 2013 10:55:57 -0400 Steven Rostedt rost...@goodmis.org wrote: On Fri, 18 Oct 2013 16:27:24 +0200 Petr Mladek pmla...@suse.cz wrote: +/* + * We do not want to replace ftrace calls one by one because syncing all CPUs + * is quite expensive. + * + * On the other

Re: [PATCH 5/6] x86: patch all traced function calls using the int3-based framework

2013-10-18 Thread Steven Rostedt
On Fri, 18 Oct 2013 16:27:24 +0200 Petr Mladek pmla...@suse.cz wrote: void ftrace_replace_code(int enable) { struct ftrace_rec_iter *iter; struct dyn_ftrace *rec; - const char *report = adding breakpoints; - int count = 0; - int ret; + unsigned long *addr =