diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-27 10:50:54 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-27 10:50:54 +0100 |
commit | 4944dd62de21230af039eda7cd218e9a09021d11 (patch) | |
tree | bac70f7bab8506c7e1b0408bacbdb0b1d77262e9 /arch/x86/include/asm/ftrace.h | |
parent | f17845e5d97ead8fbdadfd40039e058ec7cf4a42 (diff) | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) |
Merge commit 'v2.6.28-rc2' into tracing/urgent
Diffstat (limited to 'arch/x86/include/asm/ftrace.h')
-rw-r--r-- | arch/x86/include/asm/ftrace.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h new file mode 100644 index 000000000000..9e8bc29b8b17 --- /dev/null +++ b/arch/x86/include/asm/ftrace.h @@ -0,0 +1,24 @@ +#ifndef _ASM_X86_FTRACE_H +#define _ASM_X86_FTRACE_H + +#ifdef CONFIG_FUNCTION_TRACER +#define MCOUNT_ADDR ((long)(mcount)) +#define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */ + +#ifndef __ASSEMBLY__ +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. + */ + return addr - 1; +} +#endif + +#endif /* CONFIG_FUNCTION_TRACER */ + +#endif /* _ASM_X86_FTRACE_H */ |