diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 106b7909d500..f0a0ecc63b5c 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -95,6 +95,13 @@ stack_trace_sysctl(struct ctl_table *table, int write, | |||
95 | loff_t *ppos); | 95 | loff_t *ppos); |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | struct ftrace_func_command { | ||
99 | struct list_head list; | ||
100 | char *name; | ||
101 | int (*func)(char *func, char *cmd, | ||
102 | char *params, int enable); | ||
103 | }; | ||
104 | |||
98 | #ifdef CONFIG_DYNAMIC_FTRACE | 105 | #ifdef CONFIG_DYNAMIC_FTRACE |
99 | /* asm/ftrace.h must be defined for archs supporting dynamic ftrace */ | 106 | /* asm/ftrace.h must be defined for archs supporting dynamic ftrace */ |
100 | #include <asm/ftrace.h> | 107 | #include <asm/ftrace.h> |
@@ -119,6 +126,9 @@ struct dyn_ftrace { | |||
119 | int ftrace_force_update(void); | 126 | int ftrace_force_update(void); |
120 | void ftrace_set_filter(unsigned char *buf, int len, int reset); | 127 | void ftrace_set_filter(unsigned char *buf, int len, int reset); |
121 | 128 | ||
129 | int register_ftrace_command(struct ftrace_func_command *cmd); | ||
130 | int unregister_ftrace_command(struct ftrace_func_command *cmd); | ||
131 | |||
122 | /* defined in arch */ | 132 | /* defined in arch */ |
123 | extern int ftrace_ip_converted(unsigned long ip); | 133 | extern int ftrace_ip_converted(unsigned long ip); |
124 | extern int ftrace_dyn_arch_init(void *data); | 134 | extern int ftrace_dyn_arch_init(void *data); |
@@ -202,6 +212,12 @@ extern void ftrace_enable_daemon(void); | |||
202 | # define ftrace_disable_daemon() do { } while (0) | 212 | # define ftrace_disable_daemon() do { } while (0) |
203 | # define ftrace_enable_daemon() do { } while (0) | 213 | # define ftrace_enable_daemon() do { } while (0) |
204 | static inline void ftrace_release(void *start, unsigned long size) { } | 214 | static inline void ftrace_release(void *start, unsigned long size) { } |
215 | static inline int register_ftrace_command(struct ftrace_func_command *cmd) | ||
216 | { | ||
217 | } | ||
218 | static inline int unregister_ftrace_command(char *cmd_name) | ||
219 | { | ||
220 | } | ||
205 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 221 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
206 | 222 | ||
207 | /* totally disable ftrace - can not re-enable after this */ | 223 | /* totally disable ftrace - can not re-enable after this */ |