性能

ubuntu 编译perf

2021-01-13  本文已影响0人  ppt315

升级内核后,perf工具也要相应升级,否则用不了。
下面是升级内核到5.10后,出现到提示。

➜ ~ perf --help
WARNING: perf not found for kernel 5.10.6-051006

You 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-generic

You may also want to install one of the following packages to keep up to date:
linux-tools-generic
linux-cloud-tools-generic

升级步骤

  1. 下载代码
    https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D可以找到源码信息。
  1. 切换到cod/mainline/v5.10.6/tools/perf目录,执行make

  2. cp perf /usr/bin

参考链接

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
https://eastrivervillage.com/Custom-perf-with-custom-kernel/

上一篇 下一篇

猜你喜欢

热点阅读