v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8_inspector::V8HeapProfilerAgentImpl Class Reference

#include <v8-heap-profiler-agent-impl.h>

Inheritance diagram for v8_inspector::V8HeapProfilerAgentImpl:
Collaboration diagram for v8_inspector::V8HeapProfilerAgentImpl:

Classes

struct  AsyncCallbacks
 
class  GCTask
 
struct  HeapSnapshotProtocolOptions
 
class  HeapSnapshotTask
 

Public Member Functions

 V8HeapProfilerAgentImpl (V8InspectorSessionImpl *, protocol::FrontendChannel *, protocol::DictionaryValue *state)
 
 ~V8HeapProfilerAgentImpl () override
 
 V8HeapProfilerAgentImpl (const V8HeapProfilerAgentImpl &)=delete
 
V8HeapProfilerAgentImploperator= (const V8HeapProfilerAgentImpl &)=delete
 
void restore ()
 
void collectGarbage (std::unique_ptr< CollectGarbageCallback > callback) override
 
Response enable () override
 
Response startTrackingHeapObjects (std::optional< bool > trackAllocations) override
 
Response stopTrackingHeapObjects (std::optional< bool > reportProgress, std::optional< bool > treatGlobalObjectsAsRoots, std::optional< bool > captureNumericValue, std::optional< bool > exposeInternals) override
 
Response disable () override
 
void takeHeapSnapshot (std::optional< bool > reportProgress, std::optional< bool > treatGlobalObjectsAsRoots, std::optional< bool > captureNumericValue, std::optional< bool > exposeInternals, std::unique_ptr< TakeHeapSnapshotCallback > callback) override
 
Response getObjectByHeapObjectId (const String16 &heapSnapshotObjectId, std::optional< String16 > objectGroup, std::unique_ptr< protocol::Runtime::RemoteObject > *result) override
 
Response addInspectedHeapObject (const String16 &inspectedHeapObjectId) override
 
Response getHeapObjectId (const String16 &objectId, String16 *heapSnapshotObjectId) override
 
Response startSampling (std::optional< double > samplingInterval, std::optional< bool > includeObjectsCollectedByMajorGC, std::optional< bool > includeObjectsCollectedByMinorGC) override
 
Response stopSampling (std::unique_ptr< protocol::HeapProfiler::SamplingHeapProfile > *) override
 
Response getSamplingProfile (std::unique_ptr< protocol::HeapProfiler::SamplingHeapProfile > *) override
 
void takePendingHeapSnapshots ()
 

Private Member Functions

Response takeHeapSnapshotNow (const HeapSnapshotProtocolOptions &protocolOptions, cppgc::EmbedderStackState stackState)
 
void startTrackingHeapObjectsInternal (bool trackAllocations)
 
void stopTrackingHeapObjectsInternal ()
 
void requestHeapStatsUpdate ()
 
void onTimerImpl ()
 

Static Private Member Functions

static void onTimer (void *)
 

Private Attributes

V8InspectorSessionImplm_session
 
v8::Isolatem_isolate
 
protocol::HeapProfiler::Frontend m_frontend
 
protocol::DictionaryValue * m_state
 
bool m_hasTimer
 
double m_timerDelayInSeconds
 
std::shared_ptr< AsyncCallbacksm_asyncCallbacks
 

Detailed Description

Definition at line 24 of file v8-heap-profiler-agent-impl.h.

Constructor & Destructor Documentation

◆ V8HeapProfilerAgentImpl() [1/2]

v8_inspector::V8HeapProfilerAgentImpl::V8HeapProfilerAgentImpl ( V8InspectorSessionImpl * session,
protocol::FrontendChannel * frontendChannel,
protocol::DictionaryValue * state )

Definition at line 256 of file v8-heap-profiler-agent-impl.cc.

◆ ~V8HeapProfilerAgentImpl()

v8_inspector::V8HeapProfilerAgentImpl::~V8HeapProfilerAgentImpl ( )
override

Definition at line 266 of file v8-heap-profiler-agent-impl.cc.

◆ V8HeapProfilerAgentImpl() [2/2]

v8_inspector::V8HeapProfilerAgentImpl::V8HeapProfilerAgentImpl ( const V8HeapProfilerAgentImpl & )
delete

Member Function Documentation

◆ addInspectedHeapObject()

Response v8_inspector::V8HeapProfilerAgentImpl::addInspectedHeapObject ( const String16 & inspectedHeapObjectId)
override

Definition at line 449 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ collectGarbage()

void v8_inspector::V8HeapProfilerAgentImpl::collectGarbage ( std::unique_ptr< CollectGarbageCallback > callback)
override

Definition at line 295 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ disable()

Response v8_inspector::V8HeapProfilerAgentImpl::disable ( )
override

Definition at line 335 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ enable()

Response v8_inspector::V8HeapProfilerAgentImpl::enable ( )
override

Definition at line 330 of file v8-heap-profiler-agent-impl.cc.

◆ getHeapObjectId()

Response v8_inspector::V8HeapProfilerAgentImpl::getHeapObjectId ( const String16 & objectId,
String16 * heapSnapshotObjectId )
override

Definition at line 467 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ getObjectByHeapObjectId()

Response v8_inspector::V8HeapProfilerAgentImpl::getObjectByHeapObjectId ( const String16 & heapSnapshotObjectId,
std::optional< String16 > objectGroup,
std::unique_ptr< protocol::Runtime::RemoteObject > * result )
override

Definition at line 416 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ getSamplingProfile()

Response v8_inspector::V8HeapProfilerAgentImpl::getSamplingProfile ( std::unique_ptr< protocol::HeapProfiler::SamplingHeapProfile > * profile)
override

Definition at line 621 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onTimer()

void v8_inspector::V8HeapProfilerAgentImpl::onTimer ( void * data)
staticprivate

Definition at line 491 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onTimerImpl()

void v8_inspector::V8HeapProfilerAgentImpl::onTimerImpl ( )
private

Definition at line 498 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

V8HeapProfilerAgentImpl & v8_inspector::V8HeapProfilerAgentImpl::operator= ( const V8HeapProfilerAgentImpl & )
delete

◆ requestHeapStatsUpdate()

void v8_inspector::V8HeapProfilerAgentImpl::requestHeapStatsUpdate ( )
private

Definition at line 482 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore()

void v8_inspector::V8HeapProfilerAgentImpl::restore ( )

Definition at line 273 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ startSampling()

Response v8_inspector::V8HeapProfilerAgentImpl::startSampling ( std::optional< double > samplingInterval,
std::optional< bool > includeObjectsCollectedByMajorGC,
std::optional< bool > includeObjectsCollectedByMinorGC )
override

Definition at line 550 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startTrackingHeapObjects()

Response v8_inspector::V8HeapProfilerAgentImpl::startTrackingHeapObjects ( std::optional< bool > trackAllocations)
override

Definition at line 305 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ startTrackingHeapObjectsInternal()

void v8_inspector::V8HeapProfilerAgentImpl::startTrackingHeapObjectsInternal ( bool trackAllocations)
private

Definition at line 526 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopSampling()

Response v8_inspector::V8HeapProfilerAgentImpl::stopSampling ( std::unique_ptr< protocol::HeapProfiler::SamplingHeapProfile > * profile)
override

Definition at line 610 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ stopTrackingHeapObjects()

Response v8_inspector::V8HeapProfilerAgentImpl::stopTrackingHeapObjects ( std::optional< bool > reportProgress,
std::optional< bool > treatGlobalObjectsAsRoots,
std::optional< bool > captureNumericValue,
std::optional< bool > exposeInternals )
override

Definition at line 315 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ stopTrackingHeapObjectsInternal()

void v8_inspector::V8HeapProfilerAgentImpl::stopTrackingHeapObjectsInternal ( )
private

Definition at line 538 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ takeHeapSnapshot()

void v8_inspector::V8HeapProfilerAgentImpl::takeHeapSnapshot ( std::optional< bool > reportProgress,
std::optional< bool > treatGlobalObjectsAsRoots,
std::optional< bool > captureNumericValue,
std::optional< bool > exposeInternals,
std::unique_ptr< TakeHeapSnapshotCallback > callback )
override

Definition at line 348 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:

◆ takeHeapSnapshotNow()

Response v8_inspector::V8HeapProfilerAgentImpl::takeHeapSnapshotNow ( const HeapSnapshotProtocolOptions & protocolOptions,
cppgc::EmbedderStackState stackState )
private

Definition at line 383 of file v8-heap-profiler-agent-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ takePendingHeapSnapshots()

void v8_inspector::V8HeapProfilerAgentImpl::takePendingHeapSnapshots ( )

Definition at line 441 of file v8-heap-profiler-agent-impl.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ m_asyncCallbacks

std::shared_ptr<AsyncCallbacks> v8_inspector::V8HeapProfilerAgentImpl::m_asyncCallbacks
private

Definition at line 96 of file v8-heap-profiler-agent-impl.h.

◆ m_frontend

protocol::HeapProfiler::Frontend v8_inspector::V8HeapProfilerAgentImpl::m_frontend
private

Definition at line 92 of file v8-heap-profiler-agent-impl.h.

◆ m_hasTimer

bool v8_inspector::V8HeapProfilerAgentImpl::m_hasTimer
private

Definition at line 94 of file v8-heap-profiler-agent-impl.h.

◆ m_isolate

v8::Isolate* v8_inspector::V8HeapProfilerAgentImpl::m_isolate
private

Definition at line 91 of file v8-heap-profiler-agent-impl.h.

◆ m_session

V8InspectorSessionImpl* v8_inspector::V8HeapProfilerAgentImpl::m_session
private

Definition at line 90 of file v8-heap-profiler-agent-impl.h.

◆ m_state

protocol::DictionaryValue* v8_inspector::V8HeapProfilerAgentImpl::m_state
private

Definition at line 93 of file v8-heap-profiler-agent-impl.h.

◆ m_timerDelayInSeconds

double v8_inspector::V8HeapProfilerAgentImpl::m_timerDelayInSeconds
private

Definition at line 95 of file v8-heap-profiler-agent-impl.h.


The documentation for this class was generated from the following files: