[
version 5 of mcount / trace patches:
changes include:
Folded more patches together (mostly the timing stuff)
Some minor fixes to the timing code.
Redesigned the tracer!
- Now all tracers use the same buffer. This cut down tremendously
the code duplication).
- consolidated the debugfs files (see below)
This has now gone from a RFC patch series to a true PATCH series.
New! trace-cmd.c - see below
added printk patch to allow printk to happen with runqueue lock held.
]
All released version of these patches can be found at:
http://people.redhat.com/srostedt/tracing/
The following patch series brings to vanilla Linux a bit of the RT kernel
trace facility. This incorporates the "-pg" profiling option of gcc
that will call the "mcount" function for all functions called in
the kernel.
Note: I did investigate using -finstrument-functions but that adds a call
to both start and end of a function. Using mcount only does the
beginning of the function. mcount alone adds ~13% overhead. The
-finstrument-functions added ~19%. Also it caused me to do tricks with
inline, because it adds the function calls to inline functions as well.
This patch series implements the code for x86 (32 and 64 bit), but
other archs can easily be implemented as well (note: ARM and PPC are
already implemented in -rt)
Some Background:
----------------
A while back, Ingo Molnar and William Lee Irwin III created a latency tracer
to find problem latency areas in the kernel for the RT patch. This tracer
became a very integral part of the RT kernel in solving where latency hot
spots were. One of the features that the latency tracer added was a
function trace. This function tracer would record all functions that
were called (implemented by the gcc "-pg" option) and would show what was
called when interrupts or preemption was turned off.
This feature is also very helpful in normal debugging. So it's been talked
about taking bits and pieces ...