aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index b96ef14c249..db8a5e7abe4 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -5,10 +5,6 @@
5 5
6#include <linux/linkage.h> 6#include <linux/linkage.h>
7 7
8#define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
9#define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1))
10#define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2))
11
12typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); 8typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
13 9
14struct ftrace_ops { 10struct ftrace_ops {
@@ -35,4 +31,23 @@ extern void mcount(void);
35# define unregister_ftrace_function(ops) do { } while (0) 31# define unregister_ftrace_function(ops) do { } while (0)
36# define clear_ftrace_function(ops) do { } while (0) 32# define clear_ftrace_function(ops) do { } while (0)
37#endif /* CONFIG_FTRACE */ 33#endif /* CONFIG_FTRACE */
34
35
36#ifdef CONFIG_FRAME_POINTER
37/* TODO: need to fix this for ARM */
38# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
39# define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1))
40# define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2))
41# define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3))
42# define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4))
43# define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5))
44#else
45# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
46# define CALLER_ADDR1 0UL
47# define CALLER_ADDR2 0UL
48# define CALLER_ADDR3 0UL
49# define CALLER_ADDR4 0UL
50# define CALLER_ADDR5 0UL
51#endif
52
38#endif /* _LINUX_FTRACE_H */ 53#endif /* _LINUX_FTRACE_H */