diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-05-10 10:10:41 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-05-16 14:55:57 -0400 |
commit | 521ccb5c4aece609311bfa7157910a8f0c942af5 (patch) | |
tree | 5312027b1397133c6a63bbc915f0d80b86155798 /arch/x86/include/asm/ftrace.h | |
parent | 07d8b595f367f4604e6027ad4cba33cbe3f55e10 (diff) |
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 db24c2278be..268c783ab1c 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 |