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_MODULE_UNLOAD, CONFIG_UPROBES and the minimal number of auxiliary modules you need (since CONFIG_DEBUG_INFO can multiply disk space usage).
% make modules_install install
Boot into the kernel.
If you want to build instrumentation for that installed kernel without rebooting, you can use the following (replacing RELEASE with version number of the installed kernel):
% stap -r RELEASE [...]
If you do not install the kernel, simply run
% stap -r /path/to/kernel/build/tree [...]