flameGraph
聚合函数,通过堆栈跟踪列表构建一个 flamegraph。输出一个字符串数组,可以被 flamegraph.pl utility 用于渲染 flamegraph 的 SVG。
Syntax
Parameters
traces
— 一个堆栈跟踪。Array(UInt64)。size
— 内存分析的分配大小。(可选 - 默认1
)。UInt64。ptr
— 内存分配地址。(可选 - 默认0
)。UInt64。
备注
在 ptr != 0
的情况下,flameGraph 将使用相同的 size 和 ptr 将分配(size > 0)和释放(size < 0)进行映射。
只显示未被释放的分配。未映射的释放将被忽略。
Returned value
- 一个字符串数组,用于与 flamegraph.pl utility 一起使用。Array(String)。
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 - 在固定时间点找到释放情况