diff options
author | Wang Nan <wangnan0@huawei.com> | 2015-01-05 06:34:47 -0500 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-01-14 07:24:52 -0500 |
commit | bfc9657d752c47d59dc0bab85ebdc19cf60100dd (patch) | |
tree | 8fc4941e1571dd9b0d7d91703ce4ff67580984c4 /arch/arm/include/asm/kprobes.h | |
parent | 28a1899db30a9325498aef114055506286dc8010 (diff) |
ARM: optprobes: execute instruction during restoring if possible.
This patch removes software emulation or simulation for most of probed
instructions. If the instruction doesn't use PC relative addressing,
it will be translated into following instructions in the restore code
in code template:
ldmia {r0 - r14} // restore all instruction except PC
<instruction> // direct execute the probed instruction
b next_insn // branch to next instruction.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/kprobes.h')
-rw-r--r-- | arch/arm/include/asm/kprobes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h index 50ff3bc7928e..3ea9be559726 100644 --- a/arch/arm/include/asm/kprobes.h +++ b/arch/arm/include/asm/kprobes.h | |||
@@ -57,6 +57,9 @@ extern __visible kprobe_opcode_t optprobe_template_call; | |||
57 | extern __visible kprobe_opcode_t optprobe_template_end; | 57 | extern __visible kprobe_opcode_t optprobe_template_end; |
58 | extern __visible kprobe_opcode_t optprobe_template_sub_sp; | 58 | extern __visible kprobe_opcode_t optprobe_template_sub_sp; |
59 | extern __visible kprobe_opcode_t optprobe_template_add_sp; | 59 | extern __visible kprobe_opcode_t optprobe_template_add_sp; |
60 | extern __visible kprobe_opcode_t optprobe_template_restore_begin; | ||
61 | extern __visible kprobe_opcode_t optprobe_template_restore_orig_insn; | ||
62 | extern __visible kprobe_opcode_t optprobe_template_restore_end; | ||
60 | 63 | ||
61 | #define MAX_OPTIMIZED_LENGTH 4 | 64 | #define MAX_OPTIMIZED_LENGTH 4 |
62 | #define MAX_OPTINSN_SIZE \ | 65 | #define MAX_OPTINSN_SIZE \ |