5 #ifndef V8_INSPECTOR_V8_HEAP_PROFILER_AGENT_IMPL_H_ 6 #define V8_INSPECTOR_V8_HEAP_PROFILER_AGENT_IMPL_H_ 8 #include "src/base/macros.h" 9 #include "src/inspector/protocol/Forward.h" 10 #include "src/inspector/protocol/HeapProfiler.h" 12 #include "include/v8.h" 16 class V8InspectorSessionImpl;
18 using protocol::Maybe;
19 using protocol::Response;
24 protocol::DictionaryValue* state);
28 Response collectGarbage()
override;
30 Response enable()
override;
31 Response startTrackingHeapObjects(Maybe<bool> trackAllocations)
override;
32 Response stopTrackingHeapObjects(Maybe<bool> reportProgress)
override;
34 Response disable()
override;
36 Response takeHeapSnapshot(Maybe<bool> reportProgress)
override;
38 Response getObjectByHeapObjectId(
39 const String16& heapSnapshotObjectId, Maybe<String16> objectGroup,
40 std::unique_ptr<protocol::Runtime::RemoteObject>* result)
override;
41 Response addInspectedHeapObject(
42 const String16& inspectedHeapObjectId)
override;
43 Response getHeapObjectId(
const String16& objectId,
44 String16* heapSnapshotObjectId)
override;
46 Response startSampling(Maybe<double> samplingInterval)
override;
47 Response stopSampling(
48 std::unique_ptr<protocol::HeapProfiler::SamplingHeapProfile>*)
override;
49 Response getSamplingProfile(
50 std::unique_ptr<protocol::HeapProfiler::SamplingHeapProfile>*)
override;
53 void startTrackingHeapObjectsInternal(
bool trackAllocations);
54 void stopTrackingHeapObjectsInternal();
55 void requestHeapStatsUpdate();
56 static void onTimer(
void*);
59 v8::Isolate* m_isolate;
60 protocol::HeapProfiler::Frontend m_frontend;
61 protocol::DictionaryValue* m_state;
69 #endif // V8_INSPECTOR_V8_HEAP_PROFILER_AGENT_IMPL_H_