Perf 在 Ubuntu 中无法正常工作
Perf not working properly in Ubuntu
我安装了 perf 但当我尝试使用它时显示此消息
Kernel address maps (/proc/{kallsyms,modules}) were restricted.
Check /proc/sys/kernel/kptr_restrict before running 'perf record'.
As no suitable kallsyms nor vmlinux was found, kernel samples
can't be resolved.
Samples in kernel modules can't be resolved as well.
也尝试了 GTK,但它显示此消息
GTK browser requested but could not find libperf-gtk.so
我该怎么办?
尝试将 kptr_restrict
设置为 0
:
sudo sh -c " echo 0 > /proc/sys/kernel/kptr_restrict"
请注意,GTK 错误与此无关,但表明您缺少库。
我安装了 perf 但当我尝试使用它时显示此消息
Kernel address maps (/proc/{kallsyms,modules}) were restricted. Check /proc/sys/kernel/kptr_restrict before running 'perf record'.
As no suitable kallsyms nor vmlinux was found, kernel samples can't be resolved.
Samples in kernel modules can't be resolved as well.
也尝试了 GTK,但它显示此消息
GTK browser requested but could not find libperf-gtk.so
我该怎么办?
尝试将 kptr_restrict
设置为 0
:
sudo sh -c " echo 0 > /proc/sys/kernel/kptr_restrict"
请注意,GTK 错误与此无关,但表明您缺少库。