Here is a listing of some instrumentation systems for the kernel:

Existing Timing Instrumentation Systems

TimePegs

Andrew Morton's system for measuring intervals between kernel events:

See http://www.zipworld.com.au/~akpm/linux/timepeg.txt

Patches at:

http://www.zip.com.au/~akpm/linux/index.html#timepegs

Printk Times

Produces printk's with extra time data on them.

This is a very simple patch, which works for bootup time measurements, or other places where you can just jam in a printk or two.

See PrintkTimes

Kernel Function Instrumentation (KFI)

A system which uses a compiler flag to instrument most of the functions in the kernel. Timing data is recorded at each function entry and exit. The data can be extracted and displayed later with a command-line program.

The kernel portion of this is available in the CELF tree now.

Grep for CONFIG_KFI.

See the page KernelFunctionInstrumentation for some preliminary notes.

FIXTHIS - need to isolate this as a patch.

Linux Trace Toolkit

See http://www.opersys.com/LTT/

Kernel Tracer (in IKD patch)

This is part of a general kernel tools package, maintained by Andrea Arcangeli.

See http://www.kernel.org/pub/linux/kernel/people/andrea/ikd/README

The ktrace implementation is in the file kernel/debug/profiler.c It was originally written by Ingo Molnar, Richard Henderson and/or Andrea Arcangeli

It uses the compiler flag -pg to add profiling instrumentation to the kernel.

Function trace in KDB

Last year (Jan 2002) Jim Houston sent a patch to the kernel mailing list which provides support compiler-instrumented function calls.

See http://www.ussg.iu.edu/hypermail/linux/kernel/0201.3/0888.html

Notes

Some random thoughts on instrumentation:

KernelInstrumentation (last edited 2008-05-07 18:22:33 by localhost)