Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
cppgc::subtle::HeapConsistency Class Referencefinal

#include <heap-consistency.h>

Public Types

using WriteBarrierParams = internal::WriteBarrier::Params
 
using WriteBarrierType = internal::WriteBarrier::Type
 

Static Public Member Functions

static WriteBarrierType GetWriteBarrierType (const void *slot, const void *value, WriteBarrierParams &params)
 
template<typename T , typename WeaknessTag , typename WriteBarrierPolicy , typename CheckingPolicy , typename StorageType >
static WriteBarrierType GetWriteBarrierType (const internal::BasicMember< T, WeaknessTag, WriteBarrierPolicy, CheckingPolicy, StorageType > &value, WriteBarrierParams &params)
 
template<typename HeapHandleCallback >
static WriteBarrierType GetWriteBarrierType (const void *slot, WriteBarrierParams &params, HeapHandleCallback callback)
 
static WriteBarrierType GetWriteBarrierType (const void *value, WriteBarrierParams &params)
 
static void DijkstraWriteBarrier (const WriteBarrierParams &params, const void *object)
 
static void DijkstraWriteBarrierRange (const WriteBarrierParams &params, const void *first_element, size_t element_size, size_t number_of_elements, TraceCallback trace_callback)
 
static void SteeleWriteBarrier (const WriteBarrierParams &params, const void *object)
 
static void GenerationalBarrier (const WriteBarrierParams &params, const void *slot)
 
static void GenerationalBarrierForUncompressedSlot (const WriteBarrierParams &params, const void *uncompressed_slot)
 
static void GenerationalBarrierForSourceObject (const WriteBarrierParams &params, const void *inner_pointer)
 

Detailed Description

DO NOT USE: Use the appropriate managed types.

Consistency helpers that aid in maintaining a consistent internal state of the garbage collector.

Member Typedef Documentation

◆ WriteBarrierParams

◆ WriteBarrierType

Member Function Documentation

◆ DijkstraWriteBarrier()

static void cppgc::subtle::HeapConsistency::DijkstraWriteBarrier ( const WriteBarrierParams params,
const void *  object 
)
inlinestatic

Conservative Dijkstra-style write barrier that processes an object if it has not yet been processed.

Parameters
paramsThe parameters retrieved from GetWriteBarrierType().
objectThe pointer to the object. May be an interior pointer to a an interface of the actual object.
Here is the call graph for this function:

◆ DijkstraWriteBarrierRange()

static void cppgc::subtle::HeapConsistency::DijkstraWriteBarrierRange ( const WriteBarrierParams params,
const void *  first_element,
size_t  element_size,
size_t  number_of_elements,
TraceCallback  trace_callback 
)
inlinestatic

Conservative Dijkstra-style write barrier that processes a range of elements if they have not yet been processed.

Parameters
paramsThe parameters retrieved from GetWriteBarrierType().
first_elementPointer to the first element that should be processed. The slot itself must reside in an object that has been allocated using MakeGarbageCollected().
element_sizeSize of the element in bytes.
number_of_elementsNumber of elements that should be processed, starting with first_element.
trace_callbackThe trace callback that should be invoked for each element if necessary.
Here is the call graph for this function:

◆ GenerationalBarrier()

static void cppgc::subtle::HeapConsistency::GenerationalBarrier ( const WriteBarrierParams params,
const void *  slot 
)
inlinestatic

Generational barrier for maintaining consistency when running with multiple generations.

Parameters
paramsThe parameters retrieved from GetWriteBarrierType().
slotSlot containing the pointer to the object. The slot itself must reside in an object that has been allocated using MakeGarbageCollected().
Here is the call graph for this function:

◆ GenerationalBarrierForSourceObject()

static void cppgc::subtle::HeapConsistency::GenerationalBarrierForSourceObject ( const WriteBarrierParams params,
const void *  inner_pointer 
)
inlinestatic

Generational barrier for source object that may contain outgoing pointers to objects in young generation.

Parameters
paramsThe parameters retrieved from GetWriteBarrierType().
inner_pointerPointer to the source object.
Here is the call graph for this function:

◆ GenerationalBarrierForUncompressedSlot()

static void cppgc::subtle::HeapConsistency::GenerationalBarrierForUncompressedSlot ( const WriteBarrierParams params,
const void *  uncompressed_slot 
)
inlinestatic

Generational barrier for maintaining consistency when running with multiple generations. This version is used when slot contains uncompressed pointer.

Parameters
paramsThe parameters retrieved from GetWriteBarrierType().
slotUncompressed slot containing the direct pointer to the object. The slot itself must reside in an object that has been allocated using MakeGarbageCollected().
Here is the call graph for this function:

◆ GetWriteBarrierType() [1/4]

template<typename T , typename WeaknessTag , typename WriteBarrierPolicy , typename CheckingPolicy , typename StorageType >
static WriteBarrierType cppgc::subtle::HeapConsistency::GetWriteBarrierType ( const internal::BasicMember< T, WeaknessTag, WriteBarrierPolicy, CheckingPolicy, StorageType > &  value,
WriteBarrierParams params 
)
inlinestatic

Gets the required write barrier type for a specific write. This override is only used for all the BasicMember types.

Parameters
slotSlot containing the pointer to the object. The slot itself must reside in an object that has been allocated using MakeGarbageCollected().
valueThe pointer to the object held via BasicMember.
paramsParameters that may be used for actual write barrier calls. Only filled if return value indicates that a write barrier is needed. The contents of the params are an implementation detail.
Returns
whether a write barrier is needed and which barrier to invoke.
Here is the call graph for this function:

◆ GetWriteBarrierType() [2/4]

static WriteBarrierType cppgc::subtle::HeapConsistency::GetWriteBarrierType ( const void *  slot,
const void *  value,
WriteBarrierParams params 
)
inlinestatic

Gets the required write barrier type for a specific write.

Parameters
slotSlot containing the pointer to the object. The slot itself must reside in an object that has been allocated using MakeGarbageCollected().
valueThe pointer to the object. May be an interior pointer to an interface of the actual object.
paramsParameters that may be used for actual write barrier calls. Only filled if return value indicates that a write barrier is needed. The contents of the params are an implementation detail.
Returns
whether a write barrier is needed and which barrier to invoke.
Here is the call graph for this function:

◆ GetWriteBarrierType() [3/4]

template<typename HeapHandleCallback >
static WriteBarrierType cppgc::subtle::HeapConsistency::GetWriteBarrierType ( const void *  slot,
WriteBarrierParams params,
HeapHandleCallback  callback 
)
inlinestatic

Gets the required write barrier type for a specific write.

Parameters
slotSlot to some part of an object. The object must not necessarily have been allocated using MakeGarbageCollected() but can also live off-heap or on stack.
paramsParameters that may be used for actual write barrier calls. Only filled if return value indicates that a write barrier is needed. The contents of the params are an implementation detail.
callbackCallback returning the corresponding heap handle. The callback is only invoked if the heap cannot otherwise be figured out. The callback must not allocate.
Returns
whether a write barrier is needed and which barrier to invoke.
Here is the call graph for this function:

◆ GetWriteBarrierType() [4/4]

static WriteBarrierType cppgc::subtle::HeapConsistency::GetWriteBarrierType ( const void *  value,
WriteBarrierParams params 
)
inlinestatic

Gets the required write barrier type for a specific write. This version is meant to be used in conjunction with with a marking write barrier barrier which doesn't consider the slot.

Parameters
valueThe pointer to the object. May be an interior pointer to an interface of the actual object.
paramsParameters that may be used for actual write barrier calls. Only filled if return value indicates that a write barrier is needed. The contents of the params are an implementation detail.
Returns
whether a write barrier is needed and which barrier to invoke.
Here is the call graph for this function:

◆ SteeleWriteBarrier()

static void cppgc::subtle::HeapConsistency::SteeleWriteBarrier ( const WriteBarrierParams params,
const void *  object 
)
inlinestatic

Steele-style write barrier that re-processes an object if it has already been processed.

Parameters
paramsThe parameters retrieved from GetWriteBarrierType().
objectThe pointer to the object which must point to an object that has been allocated using MakeGarbageCollected(). Interior pointers are not supported.
Here is the call graph for this function:

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