diff options
author | Shaohua Li <shaohua.li@intel.com> | 2009-01-08 22:29:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-14 06:11:18 -0500 |
commit | f00012074b1a1a67d9c8603617bbbab267347ca6 (patch) | |
tree | 7a5ec4d30a513914277ccaa607ff88ecf294f84a | |
parent | 25aac9dc7c8c73798c1be8aa36141f980d32579e (diff) |
ftrace, ia64: Add macro for ftrace_caller
Define FTRACE_ADDR. In IA64, a function pointer isn't a 'unsigned long' but a
'struct {unsigned long ip, unsigned long gp}'.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/linux/ftrace.h | 4 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 677432b9cb7e..054721487574 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -126,6 +126,10 @@ extern int ftrace_update_ftrace_func(ftrace_func_t func); | |||
126 | extern void ftrace_caller(void); | 126 | extern void ftrace_caller(void); |
127 | extern void ftrace_call(void); | 127 | extern void ftrace_call(void); |
128 | extern void mcount_call(void); | 128 | extern void mcount_call(void); |
129 | |||
130 | #ifndef FTRACE_ADDR | ||
131 | #define FTRACE_ADDR ((unsigned long)ftrace_caller) | ||
132 | #endif | ||
129 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 133 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
130 | extern void ftrace_graph_caller(void); | 134 | extern void ftrace_graph_caller(void); |
131 | extern int ftrace_enable_ftrace_graph_caller(void); | 135 | extern int ftrace_enable_ftrace_graph_caller(void); |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 76bb884b6e16..9f536108d3f3 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -455,7 +455,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable) | |||
455 | unsigned long ip, fl; | 455 | unsigned long ip, fl; |
456 | unsigned long ftrace_addr; | 456 | unsigned long ftrace_addr; |
457 | 457 | ||
458 | ftrace_addr = (unsigned long)ftrace_caller; | 458 | ftrace_addr = (unsigned long)FTRACE_ADDR; |
459 | 459 | ||
460 | ip = rec->ip; | 460 | ip = rec->ip; |
461 | 461 | ||