Skip to content

Commit

Permalink
add flame_graph/what.md
Browse files Browse the repository at this point in the history
  • Loading branch information
WALL-E committed Sep 4, 2017
1 parent d16e07a commit f9a356e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
* [TIME_WAIT 问题](web/time_wait.md)
* [与 Docker 使用的网络瓶颈](web/docker.md)
* [火焰图](flame_graph.md)
* [什么是火焰图](flame_graph/what.md)
* [什么时候使用](flame_graph/when.md)
* [如何安装火焰图生成工具](flame_graph/install.md)
* [如何定位问题](flame_graph/how.md)
15 changes: 15 additions & 0 deletions flame_graph/what.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 什么是火焰图

火焰图和直方图、曲线图一样,是一种分析数据的方式,它可以更直观、更形象的展示数据,让人很容易发现数据中的隐藏信息。之所以叫火焰图,是因为这种图很像一簇火焰。

火焰图展现的数据一般是从 CPU 堆栈中采集来的数据,即函数之间的调用关系。从堆栈中采集数据有很多方式,下面是几种常见的采集工具:

* Performance Event
* SystemTap
* DTrace
* OProfile
* Gprof

数据采集到了,怎么分析它呢?为此,[Brendan Gregg](http://www.brendangregg.com/)开发了专门把采样到的堆栈轨迹(Stack Trace)转化为直观图片显示的工具——[Flame Graph](https://github.com/brendangregg/FlameGraph),这样就很容易生成火焰图了。

可见,火线图本身其实很简单,难的是从火焰图中发现问题,并且能够解释这种现象,从而找到优化系统或者解决问题的方法。

0 comments on commit f9a356e

Please sign in to comment.