Skip to main content

flameGraph

Introduced in: v23.8.0 Builds a flamegraph using the list of stacktraces. Outputs an array of strings which can be used by the flamegraph.pl utility to render an SVG of the flamegraph.
In the case where ptr != 0, a flameGraph will map allocations (size > 0) and deallocations (size < 0) with the same size and ptr. Only allocations which were not freed are shown. Non mapped deallocations are ignored.
Syntax
Arguments
  • traces — A stacktrace, either as raw addresses or as already-symbolized strings (e.g. arrayMap(addressToSymbol, trace)). Array(UInt64) or Array(String)
  • size — Optional. An allocation size for memory profiling (default 1). UInt64
  • ptr — Optional. An allocation address (default 0). UInt64
Returned value Returns an array of strings for use with flamegraph.pl utility. Array(String) Examples Building a flamegraph based on a CPU query profiler
Query
Response
Building a flamegraph based on a memory query profiler, showing all allocations
Query
Response
Building a flamegraph based on a memory query profiler, showing allocations which were not deallocated
Query
Response
Build a flamegraph based on memory query profiler, showing active allocations at a fixed point of time
Query
Response
Last modified on July 2, 2026