我无法运行“perf”命令。Perf 是一个用于堆栈跟踪的 Linux 分析器

1 profiler perf

尝试使用性能分析器。我已经安装了 linux 通用工具,但没有运气。这是我收到的消息:


r@r-K55A:~$ perf
WARNING: perf not found for kernel 3.16.0-45

  You may need to install the following packages for this specific kernel:
    linux-tools-3.16.0-45-generic
    linux-cloud-tools-3.16.0-45-generic

  You may also want to install one of the following packages to keep up to date:
    linux-tools-generic
    linux-cloud-tools-generic
Run Code Online (Sandbox Code Playgroud)

我尝试安装上述软件包,但出现以下错误:


Unable to locate package linux-tools-3.16.0-45-generic
E: Couldn't find any package by regex 'linux-tools-3.16.0-45-generic'
Run Code Online (Sandbox Code Playgroud)

Ole*_*hin 8

您可以安全地使用此代码段:

sudo apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r`
Run Code Online (Sandbox Code Playgroud)