FIG using flame perf +

use

# 安装perf
yum install perf -y
# 下载绘图工具
git clone https://github.com/brendangregg/FlameGraph.git

# 采集数据
perf record -F99-p3887-g -- sleep 30

# 生成火焰图
perf script -i perf.data &> perf.unfold
./FlameGraph/stackcollapse-perf.pl perf.unfold &> perf.folded
./FlameGraph/flamegraph.pl perf.folded > perf.svg

Meaning flame figure

  1. Flame figure is based on the stack information generated SVG images used to display the call stack CPU. The y-axis represents the call stack, each layer is a function.
  2. The deeper the call stack, the higher the flame, the function being executed is a top, the lower is its parent function. The x-axis represents the sample number, if a function of the width of the x-axis occupied by the wider,
  3. It means more times it is drawn, i.e., longer execution. Note that, x-axis does not mean time, but after all the combined call stack, arranged in alphabetical order.
  4. The figure is a function of the flame which occupies the top floor to see the maximum width. As long as there is "flat top" (plateaus), it indicates that the function may be a performance problem. Color has no special meaning,
  5. Because the flame figure shows the CPU is busy, it is generally choose warm colors.
    Here Insert Picture Description

Guess you like

Origin www.cnblogs.com/CSunShine/p/11478278.html