diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-07-20 13:08:05 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-07-31 10:29:54 -0400 |
commit | ea701f11da44b44907af226fe5a5f57d2f26eeb2 (patch) | |
tree | bed777e80fb81b28903fe4a64cb90164e499a178 /include/linux/ftrace.h | |
parent | 47239c4d8d6a24796039cada69d477a2b8cac9d6 (diff) |
ftrace: Add selftest to test function trace recursion protection
Add selftests to test the function tracing recursion protection actually
does work. It also tests if a ftrace_ops states it will perform its own
protection. Although, even if the ftrace_ops states it will protect itself,
the ftrace infrastructure may still provide protection if the arch does
not support all features or another ftrace_ops is registered.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 65a14e47a0db..9962e954a633 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -220,6 +220,10 @@ extern void ftrace_stub(unsigned long a0, unsigned long a1, | |||
220 | */ | 220 | */ |
221 | #define register_ftrace_function(ops) ({ 0; }) | 221 | #define register_ftrace_function(ops) ({ 0; }) |
222 | #define unregister_ftrace_function(ops) ({ 0; }) | 222 | #define unregister_ftrace_function(ops) ({ 0; }) |
223 | static inline int ftrace_nr_registered_ops(void) | ||
224 | { | ||
225 | return 0; | ||
226 | } | ||
223 | static inline void clear_ftrace_function(void) { } | 227 | static inline void clear_ftrace_function(void) { } |
224 | static inline void ftrace_kill(void) { } | 228 | static inline void ftrace_kill(void) { } |
225 | static inline void ftrace_stop(void) { } | 229 | static inline void ftrace_stop(void) { } |
@@ -275,6 +279,8 @@ extern void unregister_ftrace_function_probe_all(char *glob); | |||
275 | 279 | ||
276 | extern int ftrace_text_reserved(void *start, void *end); | 280 | extern int ftrace_text_reserved(void *start, void *end); |
277 | 281 | ||
282 | extern int ftrace_nr_registered_ops(void); | ||
283 | |||
278 | /* | 284 | /* |
279 | * The dyn_ftrace record's flags field is split into two parts. | 285 | * The dyn_ftrace record's flags field is split into two parts. |
280 | * the first part which is '0-FTRACE_REF_MAX' is a counter of | 286 | * the first part which is '0-FTRACE_REF_MAX' is a counter of |