gpt4 book ai didi

Linux:perf top,找不到内核符号

转载 作者:IT王子 更新时间:2023-10-29 00:43:26 28 4
gpt4 key购买 nike

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

最佳答案

我安装了 perf,并运行“perf top”,得到以下消息:

Warning:

A vmlinux file was not found.

Kernel samples will not be resolved.

安装“libelf-dev”后,我再次编译perf并进行安装。最后,我运行“perf top”并得到正确的结果。

在安装perf的过程中,系统会给出一些提示。例如:

config/Makefile:276: No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev

config/Makefile:327: No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1

config/Makefile:350: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev

config/Makefile:364: slang not found, disables TUI support. Please install slang-devel or libslang-dev

按照这些提示,也许您可​​以解决您的问题。

关于Linux:perf top,找不到内核符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33137543/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com