Skip to main content
Skip to main content

flameGraph

Aggregate function which builds a flamegraph using the list of stacktraces. Outputs an array of strings which can be used by flamegraph.pl utility to render an SVG of the flamegraph.

Syntax

Parameters

  • traces — a stacktrace. Array(UInt64).
  • size — an allocation size for memory profiling. (optional - default 1). UInt64.
  • ptr — an allocation address. (optional - default 0). UInt64.
Note

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.

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 - Memory usage per second
  • 2 - Find a time point with maximal memory usage
  • 3 - Fix active allocations at fixed point of time
  • 4 - Find deallocations at fixed point of time