diff options
Diffstat (limited to 'deps/v8/include/v8-profiler.h')
-rw-r--r-- | deps/v8/include/v8-profiler.h | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index 94d3fcfcf6..3adce79be5 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -746,33 +746,6 @@ class V8_EXPORT HeapProfiler { kSamplingForceGC = 1 << 0, }; - typedef std::unordered_set<const v8::PersistentBase<v8::Value>*> - RetainerChildren; - typedef std::vector<std::pair<v8::RetainedObjectInfo*, RetainerChildren>> - RetainerGroups; - typedef std::vector<std::pair<const v8::PersistentBase<v8::Value>*, - const v8::PersistentBase<v8::Value>*>> - RetainerEdges; - - struct RetainerInfos { - RetainerGroups groups; - RetainerEdges edges; - }; - - /** - * Callback function invoked to retrieve all RetainerInfos from the embedder. - */ - typedef RetainerInfos (*GetRetainerInfosCallback)(v8::Isolate* isolate); - - /** - * Callback function invoked for obtaining RetainedObjectInfo for - * the given JavaScript wrapper object. It is prohibited to enter V8 - * while the callback is running: only getters on the handle and - * GetPointerFromInternalField on the objects are allowed. - */ - typedef RetainedObjectInfo* (*WrapperInfoCallback)(uint16_t class_id, - Local<Value> wrapper); - /** * Callback function invoked during heap snapshot generation to retrieve * the embedder object graph. The callback should use graph->AddEdge(..) to @@ -925,16 +898,6 @@ class V8_EXPORT HeapProfiler { */ void DeleteAllHeapSnapshots(); - /** Binds a callback to embedder's class ID. */ - V8_DEPRECATED( - "Use AddBuildEmbedderGraphCallback to provide info about embedder nodes", - void SetWrapperClassInfoProvider(uint16_t class_id, - WrapperInfoCallback callback)); - - V8_DEPRECATED( - "Use AddBuildEmbedderGraphCallback to provide info about embedder nodes", - void SetGetRetainerInfosCallback(GetRetainerInfosCallback callback)); - V8_DEPRECATED( "Use AddBuildEmbedderGraphCallback to provide info about embedder nodes", void SetBuildEmbedderGraphCallback( @@ -959,80 +922,6 @@ class V8_EXPORT HeapProfiler { }; /** - * Interface for providing information about embedder's objects - * held by global handles. This information is reported in two ways: - * - * 1. When calling AddObjectGroup, an embedder may pass - * RetainedObjectInfo instance describing the group. To collect - * this information while taking a heap snapshot, V8 calls GC - * prologue and epilogue callbacks. - * - * 2. When a heap snapshot is collected, V8 additionally - * requests RetainedObjectInfos for persistent handles that - * were not previously reported via AddObjectGroup. - * - * Thus, if an embedder wants to provide information about native - * objects for heap snapshots, it can do it in a GC prologue - * handler, and / or by assigning wrapper class ids in the following way: - * - * 1. Bind a callback to class id by calling SetWrapperClassInfoProvider. - * 2. Call SetWrapperClassId on certain persistent handles. - * - * V8 takes ownership of RetainedObjectInfo instances passed to it and - * keeps them alive only during snapshot collection. Afterwards, they - * are freed by calling the Dispose class function. - */ -class V8_EXPORT RetainedObjectInfo { // NOLINT - public: - /** Called by V8 when it no longer needs an instance. */ - virtual void Dispose() = 0; - - /** Returns whether two instances are equivalent. */ - virtual bool IsEquivalent(RetainedObjectInfo* other) = 0; - - /** - * Returns hash value for the instance. Equivalent instances - * must have the same hash value. - */ - virtual intptr_t GetHash() = 0; - - /** - * Returns human-readable label. It must be a null-terminated UTF-8 - * encoded string. V8 copies its contents during a call to GetLabel. - */ - virtual const char* GetLabel() = 0; - - /** - * Returns human-readable group label. It must be a null-terminated UTF-8 - * encoded string. V8 copies its contents during a call to GetGroupLabel. - * Heap snapshot generator will collect all the group names, create - * top level entries with these names and attach the objects to the - * corresponding top level group objects. There is a default - * implementation which is required because embedders don't have their - * own implementation yet. - */ - virtual const char* GetGroupLabel() { return GetLabel(); } - - /** - * Returns element count in case if a global handle retains - * a subgraph by holding one of its nodes. - */ - virtual intptr_t GetElementCount() { return -1; } - - /** Returns embedder's object size in bytes. */ - virtual intptr_t GetSizeInBytes() { return -1; } - - protected: - RetainedObjectInfo() = default; - virtual ~RetainedObjectInfo() = default; - - private: - RetainedObjectInfo(const RetainedObjectInfo&); - RetainedObjectInfo& operator=(const RetainedObjectInfo&); -}; - - -/** * A struct for exporting HeapStats data from V8, using "push" model. * See HeapProfiler::GetHeapStats. */ |