Linux利器之perf(火焰图)
1 Ubuntu下安装perf
在Ubuntu18上默认没有安装perf,可以通过如下命令尝试:sudo apt-get install linux-tools
结果出来以下内容:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linux-tools is a virtual package provided by:
linux-tools-oem-osp1 5.0.0.1025.
linux-tools-gke-5.0 5.0.0.1023.
linux-tools-virtual-hwe-18.04-edge 5.3.0.12.
linux-tools-virtual-hwe-18.04 5.0.0.32.
linux-tools-virtual 4.15.0.66.
linux-tools-oracle 4.15.0.1027.
linux-tools-oem 4.15.0.1059.
linux-tools-lowlatency-hwe-18.04-edge 5.3.0.12.
linux-tools-lowlatency-hwe-18.04 5.0.0.32.
linux-tools-lowlatency 4.15.0.66.
linux-tools-gke-4.15 4.15.0.1046.
linux-tools-generic-hwe-18.04-edge 5.3.0.12.
linux-tools-generic-hwe-18.04 5.0.0.32.
linux-tools-generic 4.15.0.66.
linux-tools-gcp 5.0.0.1021.
linux-tools-aws 4.15.0.1052.
You should explicitly select one to install. E: Package 'linux-tools' has no installation candidate
一般选择安装 linux-tools-generic 就好了,使用如下命令:
sudo apt-get install linux-tools-common
sudo apt-get install linux-tools
可能提示错误,这个时候按照提示升级安装即可:
WARNING: perf not found for kernel 4.15.- You may need to install the following packages for this specific kernel:
linux-tools-4.15.--generic
linux-cloud-tools-4.15.--generic You may also want to install one of the following packages to keep up to date:
linux-tools-generic
linux-cloud-tools-generic
Linux利器之perf(火焰图)的更多相关文章
- Linux程序性能分析和火焰图
Linux程序性能分析和火焰图 Linux程序的性能分析工具数量比较多,涉及到整个操作系统的方方面面,可能是开源的原因吧,相对于Windows来说丰富太多.其中应用分析性能方面Dtrace, Syst ...
- perf + 火焰图用法 小结
要对新服务做性能测试,分析代码热点,初识perf,做下总结 perf + 火焰图用法 perf简介 Perf (Performance Event), Linux 系统原生提供的性能分析工具, 会返回 ...
- [转]perf + 火焰图分析程序性能
1.perf命令简要介绍 性能调优时,我们通常需要分析查找到程序百分比高的热点代码片段,这便需要使用 perf record 记录单个函数级别的统计信息,并使用 perf report 来显示统计结果 ...
- Linux性能分析利器——火焰图的安装使用
火焰图(flame graph)是性能分析的利器,通过它可以快速定位性能瓶颈点. perf 命令(performance 的缩写)是 Linux 系统原生提供的性能分析工具,会返回 CPU 正在执行的 ...
- perf + 火焰图分析程序性能
1.perf命令简要介绍 性能调优时,我们通常需要分析查找到程序百分比高的热点代码片段,这便需要使用 perf record 记录单个函数级别的统计信息,并使用 perf report 来显示统计结果 ...
- 使用linux perf工具生成java程序火焰图
pre.cjk { font-family: "Nimbus Mono L", monospace } p { margin-bottom: 0.1in; line-height: ...
- linux 内核分析工具 Dtrace、SystemTap、火焰图、crash等
<< System语言详解 >> 关于 SystemTap 的书. 我们在分析各种系统异常和故障的时候,通常会用到 pstack(jstack) /pldd/ lsof/ tc ...
- 用 CPI 火焰图分析 Linux 性能问题
https://yq.aliyun.com/articles/465499 用 CPI 火焰图分析 Linux 性能问题 yangoliver 2018-02-11 16:05:53 浏览1076 ...
- Linux火焰图-ubuntu
关注火焰图非常长的时间了!~~一直未能自己做个火焰图出来.今天小试一把. ubuntu18.04 ssh登陆之后执行命令 安装软件 apt-get install -y linux-cloud-too ...
随机推荐
- 51nod 1459 & 1212
1459 双限制最短路 #include <stdio.h> #include <iostream> #include <vector> #include < ...
- Luogu4689 [Ynoi2016]这是我自己的发明 【莫队】
题目链接:洛谷 又来做Ynoi里面的水题了... 首先换根的话是一个套路,首先以1为根dfs,然后画一画就知道以rt为根,x的子树是什么了.可以拆分为2个dfs连续段. 然后如果要计算\([l_1,r ...
- 扩展kmp学习笔记
kmp没写过,扩展kmp没学过可还行. 两个愿望,一次满足 (该博客仅用于防止自己忘记,不保证初学者能看懂我在瞎bb什么qwq) 用途 对于串\(s1,s2\),可以求出\(s2\)与\(s1\)的每 ...
- 1069 The Black Hole of Numbers(20 分)
For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in ...
- JavaScript 判断是否为空
// var a = ""; // var a = " "; // var a = null; // var a = undefined; // var a = ...
- Anriod手机抓包
1. 下载Fiddler http://fiddler2.com/ 2. 开启Fiddler的远程连接,Fiddler 主菜单 Tools -> Fiddler Options--> Co ...
- 8. String to Integer (atoi) ---Leetcode
Implement atoi to convert a string to an integer. 题目分析: 题目本身很简单就是将一个字符串转化成一个整数,但是由于字符串的千差万别,导致在实现的时候 ...
- linux 安装nginx -查看 linux的环境变量
我发现在linux上面安装linux很简单 在CentOS release 6.5 上面先看一下操作系统的版本: lsb_release -a 直接执行 yum install nginx 系统自动的 ...
- golang gin解决跨域访问
package middleware import ( "github.com/gin-gonic/gin" "net/http") func Cors() g ...
- java spark list 转为 RDD 转为 dataset 写入表中
package com.example.demo; import java.util.ArrayList; import java.util.Arrays; import java.util.Hash ...