ftrace: add quick function trace stop
authorSteven Rostedt <srostedt@redhat.com>
Wed, 5 Nov 2008 21:05:44 +0000 (16:05 -0500)
committerIngo Molnar <mingo@elte.hu>
Thu, 6 Nov 2008 06:50:51 +0000 (07:50 +0100)
commit60a7ecf42661f2b22168751298592da6ee210c9e
tree050fd052c546c92f8aac10ee71d5bb6d98a21fc8
parent79c81d220c8e25163f56edcdfaf23f83a4c88e6b
ftrace: add quick function trace stop

Impact: quick start and stop of function tracer

This patch adds a way to disable the function tracer quickly without
the need to run kstop_machine. It adds a new variable called
function_trace_stop which will stop the calls to functions from mcount
when set.  This is just an on/off switch and does not handle recursion
like preempt_disable().

It's main purpose is to help other tracers/debuggers start and stop tracing
fuctions without the need to call kstop_machine.

The config option HAVE_FUNCTION_TRACE_MCOUNT_TEST is added for archs
that implement the testing of the function_trace_stop in the mcount
arch dependent code. Otherwise, the test is done in the C code.

x86 is the only arch at the moment that supports this.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/Kconfig
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_64.S
include/linux/ftrace.h
kernel/trace/Kconfig
kernel/trace/ftrace.c