5#ifndef V8_INSPECTOR_V8_HEAP_PROFILER_AGENT_IMPL_H_
6#define V8_INSPECTOR_V8_HEAP_PROFILER_AGENT_IMPL_H_
11#include "src/inspector/protocol/Forward.h"
12#include "src/inspector/protocol/HeapProfiler.h"
20class V8InspectorSessionImpl;
22using protocol::Response;
27 protocol::DictionaryValue* state);
34 std::unique_ptr<CollectGarbageCallback>
callback)
override;
36 Response
enable()
override;
38 std::optional<bool> trackAllocations)
override;
40 std::optional<bool> reportProgress,
41 std::optional<bool> treatGlobalObjectsAsRoots,
42 std::optional<bool> captureNumericValue,
43 std::optional<bool> exposeInternals)
override;
48 std::optional<bool> reportProgress,
49 std::optional<bool> treatGlobalObjectsAsRoots,
50 std::optional<bool> captureNumericValue,
51 std::optional<bool> exposeInternals,
52 std::unique_ptr<TakeHeapSnapshotCallback>
callback)
override;
55 const String16& heapSnapshotObjectId, std::optional<String16> objectGroup,
56 std::unique_ptr<protocol::Runtime::RemoteObject>*
result)
override;
58 const String16& inspectedHeapObjectId)
override;
60 String16* heapSnapshotObjectId)
override;
63 std::optional<double> samplingInterval,
64 std::optional<bool> includeObjectsCollectedByMajorGC,
65 std::optional<bool> includeObjectsCollectedByMinorGC)
override;
67 std::unique_ptr<protocol::HeapProfiler::SamplingHeapProfile>*)
override;
69 std::unique_ptr<protocol::HeapProfiler::SamplingHeapProfile>*)
override;
Response enable() override
void collectGarbage(std::unique_ptr< CollectGarbageCallback > callback) override
Response takeHeapSnapshotNow(const HeapSnapshotProtocolOptions &protocolOptions, cppgc::EmbedderStackState stackState)
Response disable() override
void takePendingHeapSnapshots()
V8HeapProfilerAgentImpl & operator=(const V8HeapProfilerAgentImpl &)=delete
Response getHeapObjectId(const String16 &objectId, String16 *heapSnapshotObjectId) override
V8HeapProfilerAgentImpl(const V8HeapProfilerAgentImpl &)=delete
~V8HeapProfilerAgentImpl() override
Response stopTrackingHeapObjects(std::optional< bool > reportProgress, std::optional< bool > treatGlobalObjectsAsRoots, std::optional< bool > captureNumericValue, std::optional< bool > exposeInternals) override
std::shared_ptr< AsyncCallbacks > m_asyncCallbacks
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 addInspectedHeapObject(const String16 &inspectedHeapObjectId) override
V8HeapProfilerAgentImpl(V8InspectorSessionImpl *, protocol::FrontendChannel *, protocol::DictionaryValue *state)
void requestHeapStatsUpdate()
Response startSampling(std::optional< double > samplingInterval, std::optional< bool > includeObjectsCollectedByMajorGC, std::optional< bool > includeObjectsCollectedByMinorGC) override
void startTrackingHeapObjectsInternal(bool trackAllocations)
protocol::HeapProfiler::Frontend m_frontend
protocol::DictionaryValue * m_state
V8InspectorSessionImpl * m_session
void stopTrackingHeapObjectsInternal()
double m_timerDelayInSeconds
Response getSamplingProfile(std::unique_ptr< protocol::HeapProfiler::SamplingHeapProfile > *) override
Response startTrackingHeapObjects(std::optional< bool > trackAllocations) override
Response getObjectByHeapObjectId(const String16 &heapSnapshotObjectId, std::optional< String16 > objectGroup, std::unique_ptr< protocol::Runtime::RemoteObject > *result) override
Response stopSampling(std::unique_ptr< protocol::HeapProfiler::SamplingHeapProfile > *) override
static void onTimer(void *)
ZoneVector< RpoNumber > & result