v8 12.4.254 (node 22.4.1)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
EmbedderGraph::Node Class Referenceabstract

#include <v8-profiler.h>

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 839 of file v8-profiler.h.

Member Enumeration Documentation

◆ Detachedness

enum class 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 848 of file v8-profiler.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

Node ( )
default

◆ ~Node()

virtual ~Node ( )
virtualdefault

◆ Node() [2/2]

Node ( const Node )
delete

Member Function Documentation

◆ GetAddress()

virtual const void * 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.

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

◆ GetDetachedness()

virtual Detachedness 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.

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

◆ GetNativeObject()

virtual NativeObject GetNativeObject ( )
inlinevirtual

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

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

◆ IsEmbedderNode()

virtual bool IsEmbedderNode ( )
inlinevirtual

Must return true for non-V8 nodes.

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

◆ IsRootNode()

virtual bool IsRootNode ( )
inlinevirtual

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

◆ Name()

virtual const char * Name ( )
pure virtual

◆ NamePrefix()

virtual const char * NamePrefix ( )
inlinevirtual

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

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

◆ operator=()

Node & operator= ( const Node )
delete

◆ SizeInBytes()

virtual size_t SizeInBytes ( )
pure virtual

◆ WrapperNode()

virtual 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.

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


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