[PATCH 2/4] ARM: extract out insn generation code from ftrace
Dave Martin
dave.martin at linaro.org
Tue Nov 22 08:56:27 EST 2011
On Tue, Nov 22, 2011 at 07:02:13PM +0530, Rabin Vincent wrote:
> On Tue, Nov 22, 2011 at 17:32, Dave Martin <dave.martin at linaro.org> wrote:
> > On Mon, Nov 21, 2011 at 08:43:47PM +0530, Rabin Vincent wrote:
> >> static int ftrace_modify_code(unsigned long pc, unsigned long old,
> >> @@ -256,7 +203,7 @@ static int __ftrace_modify_caller(unsigned long *callsite,
> >> {
> >> unsigned long caller_fn = (unsigned long) func;
> >> unsigned long pc = (unsigned long) callsite;
> >> - unsigned long branch = ftrace_gen_branch(pc, caller_fn, false);
> >> + unsigned long branch = arm_gen_branch(pc, caller_fn);
> >> unsigned long nop = 0xe1a00000; /* mov r0, r0 */
> >
> > Does this code get used in Thumb-2 kernels? So far as I can tell, this
> > code is used... but it looks like it shouldn't work, due to the ARM
> > specifics.
>
> It's not used on Thumb-2. This is only used by the function graph
> tracer and that depends on !THUMB2_KERNEL.
I assume there's no special reason why this doesn't work with a Thumb-2
kernel, other than that it simply hasn't implemented yet?
Are there any particular problems blocking this?
Cheers
---Dave
More information about the linux-arm-kernel
mailing list