[PATCH 00/20 -v5] mcount and latency tracing utility -v5

Previous thread: [PATCHv2 8/8] [POWERPC] Move definition of buffer descriptor to cpm.h by Jochen Friedrich on Wednesday, January 23, 2008 - 12:02 pm. (1 message)

Next thread: [PATCH 12/20 -v5] Add context switch marker to sched.c by Steven Rostedt on Wednesday, January 23, 2008 - 12:02 pm. (1 message)
To: LKML <linux-kernel@...>
Cc: Ingo Molnar <mingo@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, Peter Zijlstra <a.p.zijlstra@...>, Christoph Hellwig <hch@...>, Mathieu Desnoyers <mathieu.desnoyers@...>, Gregory Haskins <ghaskins@...>, Arnaldo Carvalho de Melo <acme@...>, Thomas Gleixner <tglx@...>, Tim Bird <tim.bird@...>, Sam Ravnborg <sam@...>, Frank Ch. Eigler <fche@...>, Jan Kiszka <jan.kiszka@...>, John Stultz <johnstul@...>, Arjan van de Ven <arjan@...>
Date: Wednesday, January 23, 2008 - 12:02 pm

[
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 ...

Previous thread: [PATCHv2 8/8] [POWERPC] Move definition of buffer descriptor to cpm.h by Jochen Friedrich on Wednesday, January 23, 2008 - 12:02 pm. (1 message)

Next thread: [PATCH 12/20 -v5] Add context switch marker to sched.c by Steven Rostedt on Wednesday, January 23, 2008 - 12:02 pm. (1 message)