This source file includes following definitions.
- ftrace_ops_test
- update_function_graph_func
1
2 #ifndef _LINUX_KERNEL_FTRACE_INTERNAL_H
3 #define _LINUX_KERNEL_FTRACE_INTERNAL_H
4
5 #ifdef CONFIG_FUNCTION_TRACER
6
7
8
9
10
11
12
13
14
15
16 #define do_for_each_ftrace_op(op, list) \
17 op = rcu_dereference_raw_check(list); \
18 do
19
20
21
22
23 #define while_for_each_ftrace_op(op) \
24 while (likely(op = rcu_dereference_raw_check((op)->next)) && \
25 unlikely((op) != &ftrace_list_end))
26
27 extern struct ftrace_ops __rcu *ftrace_ops_list;
28 extern struct ftrace_ops ftrace_list_end;
29 extern struct mutex ftrace_lock;
30 extern struct ftrace_ops global_ops;
31
32 #ifdef CONFIG_DYNAMIC_FTRACE
33
34 int ftrace_startup(struct ftrace_ops *ops, int command);
35 int ftrace_shutdown(struct ftrace_ops *ops, int command);
36 int ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs);
37
38 #else
39
40 int __register_ftrace_function(struct ftrace_ops *ops);
41 int __unregister_ftrace_function(struct ftrace_ops *ops);
42
43 # define ftrace_startup(ops, command) \
44 ({ \
45 int ___ret = __register_ftrace_function(ops); \
46 if (!___ret) \
47 (ops)->flags |= FTRACE_OPS_FL_ENABLED; \
48 ___ret; \
49 })
50 # define ftrace_shutdown(ops, command) \
51 ({ \
52 int ___ret = __unregister_ftrace_function(ops); \
53 if (!___ret) \
54 (ops)->flags &= ~FTRACE_OPS_FL_ENABLED; \
55 ___ret; \
56 })
57 static inline int
58 ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs)
59 {
60 return 1;
61 }
62 #endif
63
64 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
65 extern int ftrace_graph_active;
66 void update_function_graph_func(void);
67 #else
68 # define ftrace_graph_active 0
69 static inline void update_function_graph_func(void) { }
70 #endif
71
72 #else
73 #endif
74
75 #endif