ubuntu环境下安装perf工具

检查当前环境内核的版本,执行如下命令:

uname -a

输出信息如下:

Linux jackie-ubuntu 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

安装perf工具,执行如下命令:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get install linux-tools-common linux-tools-$(uname -r)

查看perf工具的版本,执行如下命令:

perf --version

输出信息如下:

perf version 5.4.30

查看perf命令的使用帮助,输出信息如下:

 usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]

 The most commonly used perf commands are:
   annotate        Read perf.data (created by perf record) and display annotated code
   archive         Create archive with object files with build-ids found in perf.data file
   bench           General framework for benchmark suites
   buildid-cache   Manage build-id cache.
   buildid-list    List the buildids in a perf.data file
   c2c             Shared Data C2C/HITM Analyzer.
   config          Get and set variables in a configuration file.
   data            Data file related processing
   diff            Read perf.data files and display the differential profile
   evlist          List the event names in a perf.data file
   ftrace          simple wrapper for kernel's ftrace functionality
   inject          Filter to augment the events stream with additional information
   kallsyms        Searches running kernel for symbols
   kmem            Tool to trace/measure kernel memory properties
   kvm             Tool to trace/measure kvm guest os
   list            List all symbolic event types
   lock            Analyze lock events
   mem             Profile memory accesses
   record          Run a command and record its profile into perf.data
   report          Read perf.data (created by perf record) and display the profile
   sched           Tool to trace/measure scheduler properties (latencies)
   script          Read perf.data (created by perf record) and display trace output
   stat            Run a command and gather performance counter statistics
   test            Runs sanity tests.
   timechart       Tool to visualize total system behavior during a workload
   top             System profiling tool.
   version         display the version of perf binary
   probe           Define new dynamic tracepoints
   trace           strace inspired tool

 See 'perf help COMMAND' for more information on a specific command.

参考资料

相关推荐

  1. ubuntu环境安装perf工具

    2024-03-31 08:32:05       40 阅读
  2. ubuntu18 环境安装

    2024-03-31 08:32:05       49 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-31 08:32:05       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-31 08:32:05       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-31 08:32:05       82 阅读
  4. Python语言-面向对象

    2024-03-31 08:32:05       91 阅读

热门阅读

  1. Webpack

    Webpack

    2024-03-31 08:32:05      29 阅读
  2. Composer常见错误解决

    2024-03-31 08:32:05       58 阅读
  3. pytorch写一个神经网络训练示例代码

    2024-03-31 08:32:05       39 阅读
  4. 随意聊架构

    2024-03-31 08:32:05       34 阅读
  5. pytorch | with torch.no_grad()

    2024-03-31 08:32:05       31 阅读
  6. pytorch手写dataset

    2024-03-31 08:32:05       34 阅读
  7. springMVC中的适配器模式是怎么使用的

    2024-03-31 08:32:05       34 阅读
  8. Spring Boot集成disruptor快速入门demo

    2024-03-31 08:32:05       29 阅读
  9. ubunt16.04中ubuntu-drivers devices没有输出

    2024-03-31 08:32:05       32 阅读
  10. 您现在可以在家训练 70b 语言模型

    2024-03-31 08:32:05       47 阅读
  11. 在Ubuntu上配置(安装,使用)Nginx

    2024-03-31 08:32:05       36 阅读
  12. axios实现前后端通信报错Unsupported Media

    2024-03-31 08:32:05       28 阅读