- 论坛徽章:
- 9
|
本帖最后由 Tinnal 于 2014-10-11 20:35 编辑
关于自己编译的内核没有debuginfo包的问题,systemtap的官方FAQ已经有说明:
https://sourceware.org/systemtap/wiki/SystemTapFAQ
2) What config options need to be enabled to be able to use systemtap on custom built kernels?
Look at SystemTapWithSelfBuiltKernel for the specific config options to be enabled for systemtap.
3) I have a kernel built with options listed in (2), but still can't get systemtap to work. What am I missing?
See Q2. Also, if you've used 'make install' to install your custom built kernel, it may not have copied the uncompressed 'vmlinux' to /boot/vmlinux-'uname-r'. You can place 'vmlinux' in any of these locations,
/boot/vmlinux-`uname -r`
/usr/lib/debug/lib/modules/`uname -r`/vmlinux
/lib/modules/`uname -r`/vmlinux
https://sourceware.org/systemtap ... WithSelfBuiltKernel
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 [...] |
|