How*_*ane 6 linux symbols linux-kernel perf
已编译并安装具有Linux-Next内核2015-06-04的Ubuntu 15.04。
然后启动该内核,然后运行perf top,但显示未找到符号。
如何在perf中手动加载内核符号?
root@ubuntu-server:/boot# uname -r
4.1.0-rc6.060402222+
root@ubuntu-server:/proc# ls kall*
kallsyms
root@ubuntu-server:/boot# ls | grep 4.1.0-rc6.060402222
config-4.1.0-rc6.060402222+
initrd.img-4.1.0-rc6.060402222+
System.map-4.1.0-rc6.060402222+
vmlinuz-4.1.0-rc6.060402222+
root@ubuntu-server:/# perf top
No kallsyms or vmlinux with build-id 438e4365574d514672888bcfdd6292dbcf71f38f was found
[kernel.kallsyms] with build id 438e4365574d514672888bcfdd6292dbcf71f38f not found, continuing without symbols
Warning:
A vmlinux file was not found.
Kernel samples will not be resolved.
^C
root@ubuntu-server:/proc# perf top -k /boot/vmlinuz-4.1.0-rc6.060402222+
Warning:
The /boot/vmlinuz-4.1.0-rc6.060402222+ file can't be used: Success
Kernel samples will not be resolved.
^C
Run Code Online (Sandbox Code Playgroud)
在Linux-next文件夹中,.config文件已启用内核调试:
CONFIG_DEBUG_KERNEL=y
Run Code Online (Sandbox Code Playgroud)
小智 1
我安装了 perf,并运行“perf top”,收到以下消息:
警告:
未找到 vmlinux 文件。
内核样本将不会被解析。
安装“libelf-dev”后,我再次编译perf并进行安装。最后,我运行“perf top”并得到了正确的结果。
在make install perf的过程中,系统会给出一些提示。例如:
config/Makefile:276: 未找到 libelf,禁用“probe”工具,请安装 elfutils-libelf-devel/libelf-dev
config/Makefile:327:未找到 libunwind,禁用后展开支持。请安装 libunwind-dev[el] >= 1.1
config/Makefile:350: 未找到 libaudit.h,禁用“trace”工具,请安装audit-libs-devel 或 libaudit-dev
config/Makefile:364: 未找到俚语,禁用 TUI 支持。请安装 slang-devel 或 libslang-dev
按照这些提示,也许您可以解决您的问题。