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

#include <traced-handles.h>

Collaboration diagram for v8::internal::TracedHandles:

Public Types

enum class  MarkMode : uint8_t { kOnlyYoung , kAll }
 
using NodeBounds = std::vector<std::pair<const void*, const void*>>
 

Public Member Functions

 TracedHandles (Isolate *)
 
 ~TracedHandles ()
 
 TracedHandles (const TracedHandles &)=delete
 
TracedHandlesoperator= (const TracedHandles &)=delete
 
V8_INLINE FullObjectSlot Create (Address value, Address *slot, TracedReferenceStoreMode store_mode, TracedReferenceHandling reference_handling)
 
const NodeBounds GetNodeBounds () const
 
void SetIsMarking (bool)
 
void SetIsSweepingOnMutatorThread (bool)
 
void UpdateListOfYoungNodes ()
 
void DeleteEmptyBlocks ()
 
void ResetDeadNodes (WeakSlotCallbackWithHeap should_reset_handle)
 
void ResetYoungDeadNodes (WeakSlotCallbackWithHeap should_reset_handle)
 
void ComputeWeaknessForYoungObjects ()
 
void ProcessWeakYoungObjects (RootVisitor *v, WeakSlotCallbackWithHeap should_reset_handle)
 
void Iterate (RootVisitor *)
 
void IterateYoung (RootVisitor *)
 
void IterateYoungRoots (RootVisitor *)
 
void IterateAndMarkYoungRootsWithOldHosts (RootVisitor *)
 
void IterateYoungRootsWithOldHostsForTesting (RootVisitor *)
 
size_t used_node_count () const
 
size_t total_size_bytes () const
 
size_t used_size_bytes () const
 
bool HasYoung () const
 

Static Public Member Functions

static void Destroy (Address *location)
 
static void Copy (const Address *const *from, Address **to)
 
static void Move (Address **from, Address **to)
 
static Tagged< ObjectMark (Address *location, MarkMode mark_mode)
 
static Tagged< ObjectMarkConservatively (Address *inner_location, Address *traced_node_block_base, MarkMode mark_mode)
 
static bool IsValidInUseNode (const Address *location)
 

Private Member Functions

V8_INLINE std::pair< TracedNodeBlock *, TracedNode * > AllocateNode ()
 
V8_NOINLINE V8_PRESERVE_MOST void RefillUsableNodeBlocks ()
 
void FreeNode (TracedNode *node, Address zap_value)
 
V8_INLINE bool NeedsToBeRemembered (Tagged< Object > value, TracedNode *node, Address *slot, TracedReferenceStoreMode store_mode) const
 
V8_INLINE bool NeedsTrackingInYoungNodes (Tagged< Object > object, TracedNode *node) const
 
V8_INLINE CppHeapGetCppHeapIfUnifiedYoungGC (Isolate *isolate) const
 
V8_INLINE bool IsCppGCHostOld (CppHeap &cpp_heap, Address host) const
 
void Destroy (TracedNodeBlock &node_block, TracedNode &node)
 
void Copy (const TracedNode &from_node, Address **to)
 
void Move (TracedNode &from_node, Address **from, Address **to)
 
bool SupportsClearingWeakNonLiveWrappers ()
 

Private Attributes

TracedNodeBlock::OverallList blocks_
 
size_t num_blocks_ = 0
 
TracedNodeBlock::UsableList usable_blocks_
 
TracedNodeBlock::YoungList young_blocks_
 
size_t num_young_blocks_ {0}
 
std::vector< TracedNodeBlock * > empty_blocks_
 
Isolateisolate_
 
bool is_marking_ = false
 
bool is_sweeping_on_mutator_thread_ = false
 
size_t used_nodes_ = 0
 
size_t block_size_bytes_ = 0
 
bool disable_block_handling_on_free_ = false
 

Detailed Description

Definition at line 275 of file traced-handles.h.

Member Typedef Documentation

◆ NodeBounds

using v8::internal::TracedHandles::NodeBounds = std::vector<std::pair<const void*, const void*>>

Definition at line 300 of file traced-handles.h.

Member Enumeration Documentation

◆ MarkMode

enum class v8::internal::TracedHandles::MarkMode : uint8_t
strong
Enumerator
kOnlyYoung 
kAll 

Definition at line 277 of file traced-handles.h.

Constructor & Destructor Documentation

◆ TracedHandles() [1/2]

v8::internal::TracedHandles::TracedHandles ( Isolate * isolate)
explicit

Definition at line 149 of file traced-handles.cc.

◆ ~TracedHandles()

v8::internal::TracedHandles::~TracedHandles ( )

Definition at line 151 of file traced-handles.cc.

Here is the call graph for this function:

◆ TracedHandles() [2/2]

v8::internal::TracedHandles::TracedHandles ( const TracedHandles & )
delete

Member Function Documentation

◆ AllocateNode()

std::pair< TracedNodeBlock *, TracedNode * > v8::internal::TracedHandles::AllocateNode ( )
private

Definition at line 27 of file traced-handles-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeWeaknessForYoungObjects()

void v8::internal::TracedHandles::ComputeWeaknessForYoungObjects ( )

Definition at line 514 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Copy() [1/2]

void v8::internal::TracedHandles::Copy ( const Address *const * from,
Address ** to )
static

Definition at line 767 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Copy() [2/2]

void v8::internal::TracedHandles::Copy ( const TracedNode & from_node,
Address ** to )
private

Definition at line 198 of file traced-handles.cc.

Here is the call graph for this function:

◆ Create()

FullObjectSlot v8::internal::TracedHandles::Create ( Address value,
Address * slot,
TracedReferenceStoreMode store_mode,
TracedReferenceHandling reference_handling )

Definition at line 106 of file traced-handles-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteEmptyBlocks()

void v8::internal::TracedHandles::DeleteEmptyBlocks ( )

Definition at line 305 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Destroy() [1/2]

void v8::internal::TracedHandles::Destroy ( Address * location)
static

Definition at line 757 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Destroy() [2/2]

void v8::internal::TracedHandles::Destroy ( TracedNodeBlock & node_block,
TracedNode & node )
private

Definition at line 167 of file traced-handles.cc.

Here is the call graph for this function:

◆ FreeNode()

void v8::internal::TracedHandles::FreeNode ( TracedNode * node,
Address zap_value )
private

Definition at line 123 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCppHeapIfUnifiedYoungGC()

CppHeap * v8::internal::TracedHandles::GetCppHeapIfUnifiedYoungGC ( Isolate * isolate) const
private

Definition at line 47 of file traced-handles-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNodeBounds()

const TracedHandles::NodeBounds v8::internal::TracedHandles::GetNodeBounds ( ) const

Definition at line 259 of file traced-handles.cc.

◆ HasYoung()

bool v8::internal::TracedHandles::HasYoung ( ) const

Definition at line 844 of file traced-handles.cc.

Here is the call graph for this function:

◆ IsCppGCHostOld()

bool v8::internal::TracedHandles::IsCppGCHostOld ( CppHeap & cpp_heap,
Address host ) const
private

Definition at line 56 of file traced-handles-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsValidInUseNode()

bool v8::internal::TracedHandles::IsValidInUseNode ( const Address * location)
static

Definition at line 834 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Iterate()

void v8::internal::TracedHandles::Iterate ( RootVisitor * visitor)

Definition at line 682 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IterateAndMarkYoungRootsWithOldHosts()

void v8::internal::TracedHandles::IterateAndMarkYoungRootsWithOldHosts ( RootVisitor * visitor)

Definition at line 721 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IterateYoung()

void v8::internal::TracedHandles::IterateYoung ( RootVisitor * visitor)

Definition at line 693 of file traced-handles.cc.

Here is the call graph for this function:

◆ IterateYoungRoots()

void v8::internal::TracedHandles::IterateYoungRoots ( RootVisitor * visitor)

Definition at line 704 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IterateYoungRootsWithOldHostsForTesting()

void v8::internal::TracedHandles::IterateYoungRootsWithOldHostsForTesting ( RootVisitor * visitor)

Definition at line 739 of file traced-handles.cc.

Here is the call graph for this function:

◆ Mark()

Tagged< Object > v8::internal::TracedHandles::Mark ( Address * location,
MarkMode mark_mode )
static

Definition at line 809 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MarkConservatively()

Tagged< Object > v8::internal::TracedHandles::MarkConservatively ( Address * inner_location,
Address * traced_node_block_base,
MarkMode mark_mode )
static

Definition at line 821 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Move() [1/2]

void v8::internal::TracedHandles::Move ( Address ** from,
Address ** to )
static

Definition at line 778 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Move() [2/2]

void v8::internal::TracedHandles::Move ( TracedNode & from_node,
Address ** from,
Address ** to )
private

Definition at line 212 of file traced-handles.cc.

Here is the call graph for this function:

◆ NeedsToBeRemembered()

bool v8::internal::TracedHandles::NeedsToBeRemembered ( Tagged< Object > value,
TracedNode * node,
Address * slot,
TracedReferenceStoreMode store_mode ) const
private

Definition at line 67 of file traced-handles-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NeedsTrackingInYoungNodes()

bool v8::internal::TracedHandles::NeedsTrackingInYoungNodes ( Tagged< Object > object,
TracedNode * node ) const
private

Definition at line 41 of file traced-handles-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

TracedHandles & v8::internal::TracedHandles::operator= ( const TracedHandles & )
delete

◆ ProcessWeakYoungObjects()

void v8::internal::TracedHandles::ProcessWeakYoungObjects ( RootVisitor * v,
WeakSlotCallbackWithHeap should_reset_handle )

Definition at line 592 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefillUsableNodeBlocks()

void v8::internal::TracedHandles::RefillUsableNodeBlocks ( )
private

Definition at line 105 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResetDeadNodes()

void v8::internal::TracedHandles::ResetDeadNodes ( WeakSlotCallbackWithHeap should_reset_handle)

Definition at line 320 of file traced-handles.cc.

Here is the call graph for this function:

◆ ResetYoungDeadNodes()

void v8::internal::TracedHandles::ResetYoungDeadNodes ( WeakSlotCallbackWithHeap should_reset_handle)

Definition at line 350 of file traced-handles.cc.

Here is the call graph for this function:

◆ SetIsMarking()

void v8::internal::TracedHandles::SetIsMarking ( bool value)

Definition at line 249 of file traced-handles.cc.

Here is the caller graph for this function:

◆ SetIsSweepingOnMutatorThread()

void v8::internal::TracedHandles::SetIsSweepingOnMutatorThread ( bool value)

Definition at line 254 of file traced-handles.cc.

◆ SupportsClearingWeakNonLiveWrappers()

bool v8::internal::TracedHandles::SupportsClearingWeakNonLiveWrappers ( )
private

Definition at line 371 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ total_size_bytes()

size_t v8::internal::TracedHandles::total_size_bytes ( ) const
inline

Definition at line 333 of file traced-handles.h.

◆ UpdateListOfYoungNodes()

void v8::internal::TracedHandles::UpdateListOfYoungNodes ( )

Definition at line 273 of file traced-handles.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ used_node_count()

size_t v8::internal::TracedHandles::used_node_count ( ) const
inline

Definition at line 332 of file traced-handles.h.

◆ used_size_bytes()

size_t v8::internal::TracedHandles::used_size_bytes ( ) const
inline

Definition at line 334 of file traced-handles.h.

Member Data Documentation

◆ block_size_bytes_

size_t v8::internal::TracedHandles::block_size_bytes_ = 0
private

Definition at line 369 of file traced-handles.h.

◆ blocks_

TracedNodeBlock::OverallList v8::internal::TracedHandles::blocks_
private

Definition at line 357 of file traced-handles.h.

◆ disable_block_handling_on_free_

bool v8::internal::TracedHandles::disable_block_handling_on_free_ = false
private

Definition at line 370 of file traced-handles.h.

◆ empty_blocks_

std::vector<TracedNodeBlock*> v8::internal::TracedHandles::empty_blocks_
private

Definition at line 364 of file traced-handles.h.

◆ is_marking_

bool v8::internal::TracedHandles::is_marking_ = false
private

Definition at line 366 of file traced-handles.h.

◆ is_sweeping_on_mutator_thread_

bool v8::internal::TracedHandles::is_sweeping_on_mutator_thread_ = false
private

Definition at line 367 of file traced-handles.h.

◆ isolate_

Isolate* v8::internal::TracedHandles::isolate_
private

Definition at line 365 of file traced-handles.h.

◆ num_blocks_

size_t v8::internal::TracedHandles::num_blocks_ = 0
private

Definition at line 358 of file traced-handles.h.

◆ num_young_blocks_

size_t v8::internal::TracedHandles::num_young_blocks_ {0}
private

Definition at line 361 of file traced-handles.h.

◆ usable_blocks_

TracedNodeBlock::UsableList v8::internal::TracedHandles::usable_blocks_
private

Definition at line 359 of file traced-handles.h.

◆ used_nodes_

size_t v8::internal::TracedHandles::used_nodes_ = 0
private

Definition at line 368 of file traced-handles.h.

◆ young_blocks_

TracedNodeBlock::YoungList v8::internal::TracedHandles::young_blocks_
private

Definition at line 360 of file traced-handles.h.


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