SystemTap
Systemtap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system.
Easy and fast
Officially it is recommanded to build a linux-custom package to run systemtap. But rebuild the original linux package can be very easy and efficient.
Prepare
You can run sudo abs; cp -r /var/abs/core/linux .
to get the original kernel build files.
Edit config (for 32-bit system) or config.x86_64 (for 64-bit system), turn on this options:
- CONFIG_DEBUG_INFO=y
- CONFIG_KPROBES=y
- CONFIG_RELAY=y
- CONFIG_DEBUG_FS=y
- CONFIG_MODULES=y
- CONFIG_MODULE_UNLOAD=y
- CONFIG_UTRACE=y
By default only CONFIG_DEBUG_INFO and CONFIG_KPROBES is not set.
Suppose you just modified config.x86_64, now save and close it.
Run md5sum config.x86_64
to get a new md5-sum.
In PKGBUILD file, the md5sums=('sum-of-first' ... 'sum-of-last')
in the end has the same order with
source=('first-source' ... 'last-source')
, put your new md5sum in the write place.
Build and Install
Optional: you can set MAKEFLAGS="-j16"
in /etc/makepkg.conf
to speed up the compilation.
Run makepkg
to compile, then simply sudo pacman -U *.pkg.tar.gz
to install the packages.
pacman will tell you reinstall, That's great!
linux and linux-headers should be reinstalled, linux-docs does not matter.
Via this method, external modules (e.g. nvidia and virtualbox) don't need to be rebuild.
Systemtap
simply install systemtap from AUR: systemtapAUR, all done.
Build custom kernel
Please reference this README