输入perf 发现提示:
Command ‘perf’ not found, but can be installed with: sudo apt install linux-tools-common
所以,按照提示安装下 linux-tools-common
sudo apt install linux-tools-common
再次输入perf,发现仍然提示:
WARNING: perf not found for kernel 5.4.0-84
You may need to install the following packages for this specific kernel:
linux-tools-5.4.0-84-generic
linux-cloud-tools-5.4.0-84-genericYou may also want to install one of the following packages to keep up to date:
linux-tools-generic
linux-cloud-tools-generic
所以,继续安装
sudo apt install linux-tools-5.4.0-84-generic
sudo apt install linux-cloud-tools-5.4.0-84-generic
现在输入perf不再报错了。
输入命令查看机器是否支持intel pt
perf list | grep intel
如果支持intel pt就会显示这个红框中的intel_pt,否则就没有。