diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-07-20 19:08:05 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-07-31 16:29:54 +0200 |
commit | ea701f11da44b44907af226fe5a5f57d2f26eeb2 (patch) | |
tree | bed777e80fb81b28903fe4a64cb90164e499a178 /include | |
parent | ftrace: Only compile ftrace selftest if selftests are enabled (diff) | |
download | linux-ea701f11da44b44907af226fe5a5f57d2f26eeb2.tar.xz linux-ea701f11da44b44907af226fe5a5f57d2f26eeb2.zip |
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')
-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, */ #define register_ftrace_function(ops) ({ 0; }) #define unregister_ftrace_function(ops) ({ 0; }) +static inline int ftrace_nr_registered_ops(void) +{ + return 0; +} static inline void clear_ftrace_function(void) { } static inline void ftrace_kill(void) { } static inline void ftrace_stop(void) { } @@ -275,6 +279,8 @@ extern void unregister_ftrace_function_probe_all(char *glob); extern int ftrace_text_reserved(void *start, void *end); +extern int ftrace_nr_registered_ops(void); + /* * The dyn_ftrace record's flags field is split into two parts. * the first part which is '0-FTRACE_REF_MAX' is a counter of |