1 #ifndef _ASM_X86_FTRACE_H
2 #define _ASM_X86_FTRACE_H
6 .macro MCOUNT_SAVE_FRAME
18 .macro MCOUNT_RESTORE_FRAME
31 /* FIXME: I don't want to stay hardcoded */
33 # define FTRACE_SYSCALL_MAX 296
35 # define FTRACE_SYSCALL_MAX 333
38 #ifdef CONFIG_FUNCTION_TRACER
39 #define MCOUNT_ADDR ((long)(mcount))
40 #define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */
43 extern void mcount(void);
45 static inline unsigned long ftrace_call_adjust(unsigned long addr
)
48 * call mcount is "e8 <4 byte offset>"
49 * The addr points to the 4 byte offset and the caller of this
50 * function wants the pointer to e8. Simply subtract one.
55 #ifdef CONFIG_DYNAMIC_FTRACE
57 struct dyn_arch_ftrace
{
58 /* No extra data needed for x86 */
61 #endif /* CONFIG_DYNAMIC_FTRACE */
62 #endif /* __ASSEMBLY__ */
63 #endif /* CONFIG_FUNCTION_TRACER */
65 #endif /* _ASM_X86_FTRACE_H */