]> err.no Git - linux-2.6/commit
ftrace: add ftrace_enabled sysctl to disable mcount function
authorSteven Rostedt <srostedt@redhat.com>
Mon, 12 May 2008 19:20:43 +0000 (21:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 18:33:19 +0000 (20:33 +0200)
commitb0fc494fae96a7089f3651cb451f461c7291244c
tree586412b9ecbd8e3f04e8cd90a31644f94ff3a7d8
parent3d0833953e1b98b79ddf491dd49229eef9baeac1
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>
include/linux/ftrace.h
kernel/sysctl.c
kernel/trace/ftrace.c