【发布时间】:2016-01-13 06:17:57
【问题描述】:
Ubuntu 15.04,编译并安装了 Linux-Next 内核 2015-06-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文件吗?CONFIG_DEBUG_KERNEL是否在您的 Linux 配置文件中定义?您是否尝试过选项-k或--vmlinux(它们的意思相同)来指定vmlinux 路径? -
是的。请参阅我更新的问题。
-
这回答了三个问题之一:-)
标签: linux linux-kernel symbols perf