使用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
在 Linux-next 文件夹中,.config 文件已启用内核调试:
CONFIG_DEBUG_KERNEL=y
/proc/kallsyms
文件吗? 在你的 Linux 配置文件中是否定义了CONFIG_DEBUG_KERNEL
? 你尝试过使用选项-k
或--vmlinux
(它们的意思相同)来指定 vmlinux 路径吗? - amigadev