HeapProfiler Domain
Methods
Events
Types
Methods
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.collectGarbage #
HeapProfiler.disable #
HeapProfiler.enable #
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.getObjectByHeapObjectId #
parameters
- objectId
-
HeapSnapshotObjectId
- objectGroup
-
string
Symbolic group name that can be used to release multiple objects.
Return Object
- result
-
Runtime.RemoteObject
Evaluation result.
HeapProfiler.getSamplingProfile #
Return Object
- profile
-
SamplingHeapProfile
Return the sampling profile being collected.
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.
HeapProfiler.stopTrackingHeapObjects #
parameters
- reportProgress
-
boolean
If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
- treatGlobalObjectsAsRoots
-
boolean
HeapProfiler.takeHeapSnapshot #
parameters
- reportProgress
-
boolean
If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
- treatGlobalObjectsAsRoots
-
boolean
If true, a raw snapshot without artifical roots will be generated
Events
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.
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.resetProfiles #
Types
HeapProfiler.SamplingHeapProfile #
Sampling profile.
Type: object
properties
- head
-
SamplingHeapProfileNode
- samples
-
array[ SamplingHeapProfileSample ]
HeapProfiler.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.
- id
-
integer
Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
- children
-
array[ SamplingHeapProfileNode ]
Child nodes.
HeapProfiler.SamplingHeapProfileSample #
A single sample from a sampling profile.
Type: object
properties
- size
-
number
Allocation size in bytes attributed to the sample.
- nodeId
-
integer
Id of the corresponding profile tree node.
- ordinal
-
number
Time-ordered sample ordinal number. It is unique across all profiles retrieved between startSampling and stopSampling.