跳到主要内容
跳到主要内容

flameGraph

聚合函数,使用堆栈跟踪列表构建一个 flamegraph。输出一个字符串数组,可由 flamegraph.pl utility 生成火焰图的 SVG。

Syntax

Parameters

  • traces — 一个堆栈跟踪。Array(UInt64)。
  • size — 内存分析的分配大小。(可选 - 默认 1UInt64)。
  • ptr — 分配地址。(可选 - 默认 0UInt64)。
备注

ptr != 0 时,flameGraph 将映射同一大小和 ptr 的分配(size > 0)和释放(size < 0)。 只显示未释放的分配。未映射的释放被忽略。

Returned value

Examples

Building a flamegraph based on a CPU query profiler

Building a flamegraph based on a memory query profiler, showing all allocations

Building a flamegraph based on a memory query profiler, showing allocations which were not deallocated in query context

Build a flamegraph based on memory query profiler, showing active allocations at the fixed point of time

  • 1 - 每秒内存使用情况
  • 2 - 找到内存使用量最大的时间点
  • 3 - 在固定时间点固定活动分配
  • 4 - 在固定时间点找到释放情况