linux/kernel/trace
Steven Rostedt d61f82d066 ftrace: use dynamic patching for updating mcount calls
This patch replaces the indirect call to the mcount function
pointer with a direct call that will be patched by the
dynamic ftrace routines.

On boot up, the mcount function calls the ftace_stub function.
When the dynamic ftrace code is initialized, the ftrace_stub
is replaced with a call to the ftrace_record_ip, which records
the instruction pointers of the locations that call it.

Later, the ftraced daemon will call kstop_machine and patch all
the locations to nops.

When a ftrace is enabled, the original calls to mcount will now
be set top call ftrace_caller, which will do a direct call
to the registered ftrace function. This direct call is also patched
when the function that should be called is updated.

All patching is performed by a kstop_machine routine to prevent any
type of race conditions that is associated with modifying code
on the fly.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-23 20:33:47 +02:00
..
Kconfig ftrace: dynamic enabling/disabling of function calls 2008-05-23 20:33:09 +02:00
Makefile ftrace: trace preempt off critical timings 2008-05-23 20:32:54 +02:00
ftrace.c ftrace: use dynamic patching for updating mcount calls 2008-05-23 20:33:47 +02:00
trace.c ftrace: latency tracer infrastructure 2008-05-23 20:32:06 +02:00
trace.h ftrace: latency tracer infrastructure 2008-05-23 20:32:06 +02:00
trace_functions.c ftrace: function tracer 2008-05-23 20:32:13 +02:00
trace_irqsoff.c ftrace: trace preempt off critical timings 2008-05-23 20:32:54 +02:00
trace_sched_switch.c ftrace: add tracing of context switches 2008-05-23 20:32:27 +02:00
trace_sched_wakeup.c ftrace: tracer for scheduler wakeup latency 2008-05-23 20:32:36 +02:00