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

#include <v8-profiler.h>

Inheritance diagram for v8::EmbedderGraph::Node:
Collaboration diagram for v8::EmbedderGraph::Node:

Public Types

enum class  Detachedness : uint8_t { kUnknown = 0 , kAttached = 1 , kDetached = 2 }
 

Public Member Functions

 Node ()=default
 
virtual ~Node ()=default
 
virtual const char * Name ()=0
 
virtual size_t SizeInBytes ()=0
 
virtual NodeWrapperNode ()
 
virtual bool IsRootNode ()
 
virtual bool IsEmbedderNode ()
 
virtual const char * NamePrefix ()
 
virtual NativeObject GetNativeObject ()
 
virtual Detachedness GetDetachedness ()
 
virtual const void * GetAddress ()
 
 Node (const Node &)=delete
 
Nodeoperator= (const Node &)=delete
 

Detailed Description

Definition at line 842 of file v8-profiler.h.

Member Enumeration Documentation

◆ Detachedness

enum class v8::EmbedderGraph::Node::Detachedness : uint8_t
strong

Detachedness specifies whether an object is attached or detached from the main application state. While unkown in general, there may be objects that specifically know their state. V8 passes this information along in the snapshot. Users of the snapshot may use it to annotate the object graph.

Enumerator
kUnknown 
kAttached 
kDetached 

Definition at line 851 of file v8-profiler.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

v8::EmbedderGraph::Node::Node ( )
default

◆ ~Node()

virtual v8::EmbedderGraph::Node::~Node ( )
virtualdefault

◆ Node() [2/2]

v8::EmbedderGraph::Node::Node ( const Node & )
delete

Member Function Documentation

◆ GetAddress()

virtual const void * v8::EmbedderGraph::Node::GetAddress ( )
inlinevirtual

Returns the address of the object in the embedder heap, or nullptr to not specify the address. If this address is provided, then V8 can generate consistent IDs for objects across subsequent heap snapshots, which allows devtools to determine which objects were retained from one snapshot to the next. This value is used only if GetNativeObject returns nullptr.

Reimplemented in v8::internal::EmbedderNode.

Definition at line 896 of file v8-profiler.h.

◆ GetDetachedness()

virtual Detachedness v8::EmbedderGraph::Node::GetDetachedness ( )
inlinevirtual

Detachedness state of a given object. While unkown in general, there may be objects that specifically know their state. V8 passes this information along in the snapshot. Users of the snapshot may use it to annotate the object graph.

Reimplemented in v8::internal::EmbedderNode.

Definition at line 887 of file v8-profiler.h.

Here is the caller graph for this function:

◆ GetNativeObject()

virtual NativeObject v8::EmbedderGraph::Node::GetNativeObject ( )
inlinevirtual

Returns the NativeObject that can be used for querying the |HeapSnapshot|.

Definition at line 879 of file v8-profiler.h.

Here is the caller graph for this function:

◆ IsEmbedderNode()

virtual bool v8::EmbedderGraph::Node::IsEmbedderNode ( )
inlinevirtual

Must return true for non-V8 nodes.

Reimplemented in v8::internal::EmbedderGraphImpl::V8NodeImpl.

Definition at line 869 of file v8-profiler.h.

Here is the caller graph for this function:

◆ IsRootNode()

virtual bool v8::EmbedderGraph::Node::IsRootNode ( )
inlinevirtual

Reimplemented in v8::internal::EmbedderRootNode.

Definition at line 867 of file v8-profiler.h.

◆ Name()

virtual const char * v8::EmbedderGraph::Node::Name ( )
pure virtual

◆ NamePrefix()

virtual const char * v8::EmbedderGraph::Node::NamePrefix ( )
inlinevirtual

Optional name prefix. It is used in Chrome for tagging detached nodes.

Definition at line 873 of file v8-profiler.h.

◆ operator=()

Node & v8::EmbedderGraph::Node::operator= ( const Node & )
delete

◆ SizeInBytes()

virtual size_t v8::EmbedderGraph::Node::SizeInBytes ( )
pure virtual

Implemented in v8::internal::EmbedderGraphImpl::V8NodeImpl, and v8::internal::EmbedderNode.

Here is the caller graph for this function:

◆ WrapperNode()

virtual Node * v8::EmbedderGraph::Node::WrapperNode ( )
inlinevirtual

The corresponding V8 wrapper node if not null. During heap snapshot generation the embedder node and the V8 wrapper node will be merged into one node to simplify retaining paths.

Reimplemented in v8::internal::EmbedderNode.

Definition at line 866 of file v8-profiler.h.


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