Methods

HermesHermes (Legacy)Chrome DevTools

HeapProfiler.collectGarbage #


HermesHermes (Legacy)Chrome DevTools

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.


HermesHermes (Legacy)Chrome DevTools

HeapProfiler.getObjectByHeapObjectId #

Parameters

objectGroup
Optional
string

Symbolic group name that can be used to release multiple objects.

Return object

result
Runtime.RemoteObject

Evaluation result.


HermesHermes (Legacy)Chrome DevTools

HeapProfiler.startSampling #

Parameters

samplingInterval
Optional
number

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

includeObjectsCollectedByMajorGC
Optional
boolean

By 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.

includeObjectsCollectedByMinorGC
Optional
boolean

By 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.


HermesHermes (Legacy)Chrome DevTools

HeapProfiler.startTrackingHeapObjects #

Parameters

trackAllocations
Optional
boolean

HermesHermes (Legacy)Chrome DevTools

HeapProfiler.stopSampling #

Return object

profile
SamplingHeapProfile

Recorded sampling heap profile.


HermesHermes (Legacy)Chrome DevTools

HeapProfiler.stopTrackingHeapObjects #

Parameters

reportProgress
Optional
boolean

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

treatGlobalObjectsAsRoots
Optional
boolean

Deprecated in favor of exposeInternals.

Deprecated
captureNumericValue
Optional
boolean

If true, numerical values are included in the snapshot

exposeInternals
Optional
boolean

If true, exposes internals of the snapshot.

Experimental

HermesHermes (Legacy)Chrome DevTools

HeapProfiler.takeHeapSnapshot #

Parameters

reportProgress
Optional
boolean

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

treatGlobalObjectsAsRoots
Optional
boolean

If true, a raw snapshot without artificial roots will be generated. Deprecated in favor of exposeInternals.

Deprecated
captureNumericValue
Optional
boolean

If true, numerical values are included in the snapshot

exposeInternals
Optional
boolean

If true, exposes internals of the snapshot.

Experimental

Events

HermesHermes (Legacy)Chrome DevTools

HeapProfiler.addHeapSnapshotChunk #

Parameters

chunk
string

HermesHermes (Legacy)Chrome DevTools

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.


HermesHermes (Legacy)Chrome DevTools

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

HermesHermes (Legacy)Chrome DevTools

HeapProfiler.reportHeapSnapshotProgress #

Parameters

done
integer
total
integer
finished
Optional
boolean