Linux kernel Can';在'中看不到内核符号;性能报告';试图在CentOS 7.7上跟踪探测器时
我试图了解在CentOS 7.7(x86-64)上,内核代码调用的特定函数是什么。我试过这个:Linux kernel Can';在'中看不到内核符号;性能报告';试图在CentOS 7.7上跟踪探测器时,linux-kernel,perf,Linux Kernel,Perf,我试图了解在CentOS 7.7(x86-64)上,内核代码调用的特定函数是什么。我试过这个: perf probe -a vsnprintf perf record -e probe:vsnprintf -aR sleep 10 然后,当我尝试: perf report --stdio 我在输出中只看到一堆十六进制数,而不是函数名: # Total Lost Samples: 0 # # Samples: 331 of event 'probe:vsnprintf' # Event co
perf probe -a vsnprintf
perf record -e probe:vsnprintf -aR sleep 10
然后,当我尝试:
perf report --stdio
我在输出中只看到一堆十六进制数,而不是函数名:
# Total Lost Samples: 0
#
# Samples: 331 of event 'probe:vsnprintf'
# Event count (approx.): 331
#
# Children Self Trace output
# ........ ........ ..................
#
100.00% 100.00% (ffffffffaf58c750)
|
|--56.19%--0
| __GI___libc_read
| 0xffffffffaf98bede
| 0xffffffffaf4493bf
| 0xffffffffaf4484ff
| 0xffffffffaf4c09b0
内核版本(我在KVM上的VM中运行):
我选择了vsnprintf,因为它经常出现在“perf top”(内核符号-在这里我正确地看到了符号)中
有没有办法查看实际的函数名?RHEL 7.7中的Perf有一个错误,它无法报告内核符号: 我强烈怀疑CentOS 7.7也有同样的错误。按照上面页面中建议的解决方法,我已将性能降级到CentOS 7.6中的版本,并且似乎可以工作:
# give access to packages from 7.6
yum-config-manager --add-repo=http://vault.centos.org/centos/7.6.1810/updates/x86_64/
# reinstall older perf
yum remove perf
yum install perf-3.10.0-957.1.3.el7
# optional: disable the vault repo
yum-config-manager --disable vault.centos.org_centos_7.6.1810_updates_x86_64_
# test that it now works
perf record -a -g -- sleep 3
perf report --stdio
# looks good!
RHEL 7.7中的Perf有一个bug,它阻止它报告内核符号: 我强烈怀疑CentOS 7.7也有同样的错误。按照上面页面中建议的解决方法,我已将性能降级到CentOS 7.6中的版本,并且似乎可以工作:
# give access to packages from 7.6
yum-config-manager --add-repo=http://vault.centos.org/centos/7.6.1810/updates/x86_64/
# reinstall older perf
yum remove perf
yum install perf-3.10.0-957.1.3.el7
# optional: disable the vault repo
yum-config-manager --disable vault.centos.org_centos_7.6.1810_updates_x86_64_
# test that it now works
perf record -a -g -- sleep 3
perf report --stdio
# looks good!
谢谢,这肯定会使情况有所改善!CentOS/RHEL没有严格地将性能与Ubuntu这样的内核绑定在一起,这很好。不过,我仍然收到一些未解析的地址。是否树外模块中的地址未解析?我们有很多这样的东西。可能是真的,特别是如果它们是隐藏符号的专有模块的话。我的理解是perf在/proc/kallsyms中查找内核符号(也许它也可以使用其他源代码),您可以检查那些树外模块是否在那里公开了符号。谢谢,这肯定会有所改进!CentOS/RHEL没有严格地将性能与Ubuntu这样的内核绑定在一起,这很好。不过,我仍然收到一些未解析的地址。是否树外模块中的地址未解析?我们有很多这样的东西。可能是真的,特别是如果它们是隐藏符号的专有模块的话。我的理解是perf在/proc/kallsyms中查找内核符号(也许它也可以使用其他源代码),您可以检查那些树外模块是否在那里公开符号。