stable (1.2) latest (tip-of-tree) v8-inspector (node) Home Domains Accessibility Animation ApplicationCache Browser CSS CacheStorage Console DOM DOMDebugger DOMSnapshot DOMStorage Database Debugger DeviceOrientation Emulation HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Overlay Page Profiler Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome DevTools Protocol Viewer - latest (tip-of-tree)

HeapProfiler Domain

Experimental

Methods

HeapProfiler.enable

HeapProfiler.disable

HeapProfiler.startTrackingHeapObjects

Parameters
trackAllocations
boolean

HeapProfiler.stopTrackingHeapObjects

Parameters
reportProgress
boolean If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.

HeapProfiler.takeHeapSnapshot

Parameters
reportProgress
boolean If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.

HeapProfiler.collectGarbage

HeapProfiler.getObjectByHeapObjectId

Parameters
objectGroup
string Symbolic group name that can be used to release multiple objects.
Return object
result
Runtime.RemoteObject Evaluation result.

HeapProfiler.addInspectedHeapObject

Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

Parameters
heapObjectId
HeapSnapshotObjectId Heap snapshot object id to be accessible by means of $x command line API.

HeapProfiler.getHeapObjectId

Parameters
objectId
Runtime.RemoteObjectId Identifier of the object to get heap object id for.
Return object
heapSnapshotObjectId
HeapSnapshotObjectId Id of the heap snapshot object corresponding to the passed remote object id.

HeapProfiler.startSampling

Parameters
samplingInterval
number Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.

HeapProfiler.stopSampling

Return object
profile
SamplingHeapProfile Recorded sampling heap profile.

Events

HeapProfiler. addHeapSnapshotChunk

Parameters
chunk
string

HeapProfiler. resetProfiles

HeapProfiler. reportHeapSnapshotProgress

Parameters
done
integer
total
integer
finished
boolean

HeapProfiler. lastSeenObjectId

If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.

Parameters
lastSeenObjectId
integer
timestamp
number

HeapProfiler. heapStatsUpdate

If heap objects tracking has been started then backend may send update for one or more fragments

Parameters
statsUpdate
array [integer] An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.

Types

HeapSnapshotObjectId

Heap snapshot object id.

Type: string

SamplingHeapProfileNode

Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.

Type: object

Properties
callFrame
Runtime.CallFrame Function location.
selfSize
number Allocations size in bytes for the node excluding children.
children
array [ SamplingHeapProfileNode ] Child nodes.

SamplingHeapProfile

Profile.

Type: object

Properties