Using systemtap with self-built kernels

If you are running a kernel that you built and installed "by hand", rather than by installing a package from a distribution, you can follow these steps to use systemtap. The following blurb may also be found at the bottom of the README file in the sources. See also cross compiling tips.

Build the kernel using your normal procedures. Enable CONFIG_DEBUG_INFO, CONFIG_KPROBES, CONFIG_RELAY, CONFIG_DEBUG_FS, CONFIG_MODULES, CONFIG_MODULES_UNLOAD, and the minimal number of auxiliary modules you need (since CONFIG_DEBUG_INFO can multiply disk space usage).

% make modules_install install headers_install

Boot into the kernel.

If you wish to leave the kernel build tree in place, simply run

% stap -r /path/to/kernel/build/tree [...]

You're done.

Or else, if you wish to install the kernel build/debuginfo data into a place where systemtap will find it without the "-r" option:

% ln -s /path/to/kernel/build/tree /lib/modules/RELEASE/build

None: SystemTapWithSelfBuiltKernel (last edited 2008-12-22 23:47:59 by FChE)