ubuntu 编译perf
2021-01-13 本文已影响0人
ppt315
升级内核后,perf工具也要相应升级,否则用不了。
下面是升级内核到5.10后,出现到提示。
➜ ~ perf --help
WARNING: perf not found for kernel 5.10.6-051006You may need to install the following packages for this specific kernel:
linux-tools-5.10.6-051006-generic
linux-cloud-tools-5.10.6-051006-genericYou may also want to install one of the following packages to keep up to date:
linux-tools-generic
linux-cloud-tools-generic
升级步骤
- 下载代码
从https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D可以找到源码信息。
-
切换到cod/mainline/v5.10.6/tools/perf目录,执行make
-
cp perf /usr/bin
参考链接
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
https://eastrivervillage.com/Custom-perf-with-custom-kernel/