diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-05-12 15:20:43 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:33:19 -0400 |
commit | b0fc494fae96a7089f3651cb451f461c7291244c (patch) | |
tree | 586412b9ecbd8e3f04e8cd90a31644f94ff3a7d8 /include/linux/ftrace.h | |
parent | 3d0833953e1b98b79ddf491dd49229eef9baeac1 (diff) |
ftrace: add ftrace_enabled sysctl to disable mcount function
This patch adds back the sysctl ftrace_enabled. This time it is
defaulted to on, if DYNAMIC_FTRACE is configured. When ftrace_enabled
is disabled, the ftrace function is set to the stub return.
If DYNAMIC_FTRACE is also configured, on ftrace_enabled = 0,
the registered ftrace functions will all be set to jmps, but no more
new calls to ftrace recording (used to find the ftrace calling sites)
will be called.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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 90dbc0ee204..ccd8537dbdb 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -5,6 +5,12 @@ | |||
5 | 5 | ||
6 | #include <linux/linkage.h> | 6 | #include <linux/linkage.h> |
7 | 7 | ||
8 | extern int ftrace_enabled; | ||
9 | extern int | ||
10 | ftrace_enable_sysctl(struct ctl_table *table, int write, | ||
11 | struct file *filp, void __user *buffer, size_t *lenp, | ||
12 | loff_t *ppos); | ||
13 | |||
8 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); | 14 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); |
9 | 15 | ||
10 | struct ftrace_ops { | 16 | struct ftrace_ops { |