HeapProfiler Domain
Methods
- HeapProfiler.addInspectedHeapObject
- HeapProfiler.collectGarbage
- HeapProfiler.disable
- HeapProfiler.enable
- HeapProfiler.getHeapObjectId
- HeapProfiler.getObjectByHeapObjectId
- HeapProfiler.getSamplingProfile
- HeapProfiler.startSampling
- HeapProfiler.startTrackingHeapObjects
- HeapProfiler.stopSampling
- HeapProfiler.stopTrackingHeapObjects
- HeapProfiler.takeHeapSnapshot
Events
- HeapProfiler.addHeapSnapshotChunk
- HeapProfiler.heapStatsUpdate
- HeapProfiler.lastSeenObjectId
- HeapProfiler.reportHeapSnapshotProgress
- HeapProfiler.resetProfiles
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 Heap snapshot object id to be accessible by means of $x command line API.
HeapProfiler.getHeapObjectId #
Parameters
objectId Identifier of the object to get heap object id for.
Return object
heapSnapshotObjectId Id of the heap snapshot object corresponding to the passed remote object id.
HeapProfiler.getObjectByHeapObjectId #
Parameters
objectId objectGroupOptional
stringSymbolic group name that can be used to release multiple objects.
Return object
result Evaluation result.
HeapProfiler.getSamplingProfile #
Return object
profile Return the sampling profile being collected.
HeapProfiler.startSampling #
Parameters
samplingIntervalOptional
numberAverage sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
stackDepthOptional
numberMaximum stack depth. The default value is 128.
includeObjectsCollectedByMajorGCOptional
booleanBy default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses.
includeObjectsCollectedByMinorGCOptional
booleanBy default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.
HeapProfiler.stopTrackingHeapObjects #
Parameters
reportProgressOptional
booleanIf true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
treatGlobalObjectsAsRootsOptional
booleanDeprecated in favor of exposeInternals.
captureNumericValueOptional
booleanIf true, numerical values are included in the snapshot
exposeInternalsOptional
booleanIf true, exposes internals of the snapshot.
HeapProfiler.takeHeapSnapshot #
Parameters
reportProgressOptional
booleanIf true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
treatGlobalObjectsAsRootsOptional
booleanIf true, a raw snapshot without artificial roots will be generated.
Deprecated in favor of exposeInternals.
captureNumericValueOptional
booleanIf true, numerical values are included in the snapshot
exposeInternalsOptional
booleanIf true, exposes internals of the snapshot.
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 integertimestamp numberHeapProfiler.reportHeapSnapshotProgress #
Parameters
done integertotal integerfinishedOptional
booleanTypes
HeapProfiler.SamplingHeapProfileNode #
Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
Type: object
Properties
callFrame Function location.
selfSize numberAllocations size in bytes for the node excluding children.
id integerNode 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 numberAllocation size in bytes attributed to the sample.
nodeId integerId of the corresponding profile tree node.
ordinal numberTime-ordered sample ordinal number. It is unique across all profiles retrieved between startSampling and stopSampling.
HeapProfiler.SamplingHeapProfile #
Sampling profile.
Type: object
Properties
samples array[ SamplingHeapProfileSample ]