diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-05-10 10:10:41 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-05-17 10:42:09 -0400 |
commit | 414eb44dda6b9893b212b2306ccb423ab01eef8e (patch) | |
tree | a6e83f79a539353e52ac951e0cc09d3057c219ef /arch/x86/include/asm/ftrace.h | |
parent | f215efc50a3c1430735e89915fae188f927d8773 (diff) | |
download | op-kernel-dev-414eb44dda6b9893b212b2306ccb423ab01eef8e.zip op-kernel-dev-414eb44dda6b9893b212b2306ccb423ab01eef8e.tar.gz |
ftrace/x86: mcount offset calculation
Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch]
at compile time and not in ftrace_call_adjust at run time.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'arch/x86/include/asm/ftrace.h')
-rw-r--r-- | arch/x86/include/asm/ftrace.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h index db24c22..268c783 100644 --- a/arch/x86/include/asm/ftrace.h +++ b/arch/x86/include/asm/ftrace.h @@ -38,11 +38,10 @@ extern void mcount(void); static inline unsigned long ftrace_call_adjust(unsigned long addr) { /* - * call mcount is "e8 <4 byte offset>" - * The addr points to the 4 byte offset and the caller of this - * function wants the pointer to e8. Simply subtract one. + * addr is the address of the mcount call instruction. + * recordmcount does the necessary offset calculation. */ - return addr - 1; + return addr; } #ifdef CONFIG_DYNAMIC_FTRACE |