Re: [PATCH v6 5/7] arm64: ftrace: Add dynamic ftrace support

2014-03-13 Thread AKASHI Takahiro
Thank you for you clarification, Steven. -Takahiro AKASHI On 03/14/2014 03:33 AM, Steven Rostedt wrote: On Thu, 2014-03-13 at 18:10 +, Will Deacon wrote: +#else /* CONFIG_DYNAMIC_FTRACE */ +/* + * _mcount() is used to build the kernel with -pg option, but all the branch + * instructions

Re: [PATCH v6 5/7] arm64: ftrace: Add dynamic ftrace support

2014-03-13 Thread AKASHI Takahiro
On 03/14/2014 03:10 AM, Will Deacon wrote: On Thu, Mar 13, 2014 at 10:13:48AM +, AKASHI Takahiro wrote: This patch allows "dynamic ftrace" if CONFIG_DYNAMIC_FTRACE is enabled. Here we can turn on and off tracing dynamically per-function base. On arm64, this is done by patching single branch

Re: [PATCH v6 5/7] arm64: ftrace: Add dynamic ftrace support

2014-03-13 Thread Steven Rostedt
On Thu, 2014-03-13 at 18:10 +, Will Deacon wrote: > > > +#else /* CONFIG_DYNAMIC_FTRACE */ > > +/* > > + * _mcount() is used to build the kernel with -pg option, but all the > > branch > > + * instructions to _mcount() are replaced to NOP initially at kernel start > > up, > > + * and later

Re: [PATCH v6 5/7] arm64: ftrace: Add dynamic ftrace support

2014-03-13 Thread Will Deacon
On Thu, Mar 13, 2014 at 10:13:48AM +, AKASHI Takahiro wrote: > This patch allows "dynamic ftrace" if CONFIG_DYNAMIC_FTRACE is enabled. > Here we can turn on and off tracing dynamically per-function base. > > On arm64, this is done by patching single branch instruction to _mcount() > inserted b

[PATCH v6 5/7] arm64: ftrace: Add dynamic ftrace support

2014-03-13 Thread AKASHI Takahiro
This patch allows "dynamic ftrace" if CONFIG_DYNAMIC_FTRACE is enabled. Here we can turn on and off tracing dynamically per-function base. On arm64, this is done by patching single branch instruction to _mcount() inserted by gcc -pg option. The branch is replaced to NOP initially at kernel start u