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

#include <marker.h>

Inheritance diagram for cppgc::internal::MarkerBase:
Collaboration diagram for cppgc::internal::MarkerBase:

Classes

class  IncrementalMarkingAllocationObserver
 
class  IncrementalMarkingTask
 
class  PauseConcurrentMarkingScope
 

Public Types

enum class  WriteBarrierType { kDijkstra , kSteele }
 

Public Member Functions

virtual ~MarkerBase ()
 
 MarkerBase (const MarkerBase &)=delete
 
MarkerBaseoperator= (const MarkerBase &)=delete
 
template<typename Class >
Class & To ()
 
void EnterAtomicPause (StackState)
 
void EnterProcessGlobalAtomicPause ()
 
void ReEnableConcurrentMarking ()
 
bool AdvanceMarkingWithLimits (v8::base::TimeDelta=kMaximumIncrementalStepDuration, size_t marked_bytes_limit=0)
 
size_t last_bytes_marked () const
 
void LeaveAtomicPause ()
 
void StartMarking ()
 
void FinishMarking (StackState)
 
void ProcessCrossThreadWeaknessIfNeeded ()
 
void ProcessWeakness ()
 
bool JoinConcurrentMarkingIfNeeded ()
 
void NotifyConcurrentMarkingOfWorkIfNeeded (cppgc::TaskPriority)
 
template<WriteBarrierType type>
void WriteBarrierForObject (HeapObjectHeader &)
 
HeapBaseheap ()
 
cppgc::VisitorVisitor ()
 
bool IsMarking () const
 
void SetMainThreadMarkingDisabledForTesting (bool)
 
void WaitForConcurrentMarkingForTesting ()
 
void ClearAllWorklistsForTesting ()
 
bool IncrementalMarkingStepForTesting (StackState)
 
MarkingWorklistsMarkingWorklistsForTesting ()
 
MutatorMarkingStateMutatorMarkingStateForTesting ()
 

Protected Types

using IncrementalMarkingTaskHandle = SingleThreadedHandle
 

Protected Member Functions

 MarkerBase (HeapBase &, cppgc::Platform *, MarkingConfig)
 
virtual cppgc::Visitorvisitor ()=0
 
virtual ConservativeTracingVisitorconservative_visitor ()=0
 
virtual heap::base::StackVisitorstack_visitor ()=0
 
virtual ConcurrentMarkerBaseconcurrent_marker ()=0
 
virtual heap::base::IncrementalMarkingScheduleschedule ()=0
 
bool ProcessWorklistsWithDeadline (size_t marked_bytes_deadline, v8::base::TimeTicks time_deadline)
 
void AdvanceMarkingWithLimitsEpilogue ()
 
void VisitLocalRoots (StackState)
 
void VisitCrossThreadRoots ()
 
void MarkNotFullyConstructedObjects ()
 
virtual void ScheduleIncrementalMarkingTask ()
 
bool IncrementalMarkingStep (StackState)
 
void AdvanceMarkingOnAllocation ()
 
virtual void AdvanceMarkingOnAllocationImpl ()
 
void HandleNotFullyConstructedObjects ()
 
void MarkStrongCrossThreadRoots ()
 

Protected Attributes

HeapBaseheap_
 
MarkingConfig config_ = MarkingConfig::Default()
 
cppgc::Platformplatform_
 
std::shared_ptr< cppgc::TaskRunnerforeground_task_runner_
 
IncrementalMarkingTaskHandle incremental_marking_handle_
 
IncrementalMarkingAllocationObserver incremental_marking_allocation_observer_
 
MarkingWorklists marking_worklists_
 
MutatorMarkingState mutator_marking_state_
 
size_t last_bytes_marked_ = 0
 
bool is_marking_ {false}
 
bool main_marking_disabled_for_testing_ {false}
 
bool visited_cross_thread_persistents_in_atomic_pause_ {false}
 
bool processed_cross_thread_weakness_ {false}
 

Static Protected Attributes

static constexpr v8::base::TimeDelta kMaximumIncrementalStepDuration
 

Detailed Description

Definition at line 45 of file marker.h.

Member Typedef Documentation

◆ IncrementalMarkingTaskHandle

Member Enumeration Documentation

◆ WriteBarrierType

Enumerator
kDijkstra 
kSteele 

Definition at line 49 of file marker.h.

Constructor & Destructor Documentation

◆ ~MarkerBase()

cppgc::internal::MarkerBase::~MarkerBase ( )
virtual

Definition at line 166 of file marker.cc.

Here is the call graph for this function:

◆ MarkerBase() [1/2]

cppgc::internal::MarkerBase::MarkerBase ( const MarkerBase & )
delete

◆ MarkerBase() [2/2]

cppgc::internal::MarkerBase::MarkerBase ( HeapBase & heap,
cppgc::Platform * platform,
MarkingConfig config )
protected

Definition at line 153 of file marker.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AdvanceMarkingOnAllocation()

void cppgc::internal::MarkerBase::AdvanceMarkingOnAllocation ( )
protected

Definition at line 565 of file marker.cc.

Here is the call graph for this function:

◆ AdvanceMarkingOnAllocationImpl()

void cppgc::internal::MarkerBase::AdvanceMarkingOnAllocationImpl ( )
protectedvirtual

Reimplemented in v8::internal::UnifiedHeapMarker.

Definition at line 573 of file marker.cc.

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

◆ AdvanceMarkingWithLimits()

bool cppgc::internal::MarkerBase::AdvanceMarkingWithLimits ( v8::base::TimeDelta max_duration = kMaximumIncrementalStepDuration,
size_t marked_bytes_limit = 0 )

Definition at line 610 of file marker.cc.

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

◆ AdvanceMarkingWithLimitsEpilogue()

void cppgc::internal::MarkerBase::AdvanceMarkingWithLimitsEpilogue ( )
protected

Definition at line 600 of file marker.cc.

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

◆ ClearAllWorklistsForTesting()

void cppgc::internal::MarkerBase::ClearAllWorklistsForTesting ( )

Definition at line 767 of file marker.cc.

Here is the call graph for this function:

◆ concurrent_marker()

virtual ConcurrentMarkerBase & cppgc::internal::MarkerBase::concurrent_marker ( )
protectedpure virtual

Implemented in cppgc::internal::Marker, and v8::internal::UnifiedHeapMarker.

Here is the caller graph for this function:

◆ conservative_visitor()

virtual ConservativeTracingVisitor & cppgc::internal::MarkerBase::conservative_visitor ( )
protectedpure virtual

Implemented in cppgc::internal::Marker, and v8::internal::UnifiedHeapMarker.

Here is the caller graph for this function:

◆ EnterAtomicPause()

void cppgc::internal::MarkerBase::EnterAtomicPause ( StackState stack_state)

Definition at line 251 of file marker.cc.

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

◆ EnterProcessGlobalAtomicPause()

void cppgc::internal::MarkerBase::EnterProcessGlobalAtomicPause ( )

Definition at line 325 of file marker.cc.

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

◆ FinishMarking()

void cppgc::internal::MarkerBase::FinishMarking ( StackState stack_state)

Definition at line 327 of file marker.cc.

Here is the call graph for this function:

◆ HandleNotFullyConstructedObjects()

void cppgc::internal::MarkerBase::HandleNotFullyConstructedObjects ( )
protected

Definition at line 243 of file marker.cc.

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

◆ heap()

HeapBase & cppgc::internal::MarkerBase::heap ( )
inline

Definition at line 130 of file marker.h.

Here is the caller graph for this function:

◆ IncrementalMarkingStep()

bool cppgc::internal::MarkerBase::IncrementalMarkingStep ( StackState stack_state)
protected

Definition at line 556 of file marker.cc.

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

◆ IncrementalMarkingStepForTesting()

bool cppgc::internal::MarkerBase::IncrementalMarkingStepForTesting ( StackState stack_state)

Definition at line 552 of file marker.cc.

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

◆ IsMarking()

bool cppgc::internal::MarkerBase::IsMarking ( ) const
inline

Definition at line 134 of file marker.h.

Here is the caller graph for this function:

◆ JoinConcurrentMarkingIfNeeded()

bool cppgc::internal::MarkerBase::JoinConcurrentMarkingIfNeeded ( )

Definition at line 580 of file marker.cc.

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

◆ last_bytes_marked()

size_t cppgc::internal::MarkerBase::last_bytes_marked ( ) const
inline

Definition at line 103 of file marker.h.

◆ LeaveAtomicPause()

void cppgc::internal::MarkerBase::LeaveAtomicPause ( )

Definition at line 308 of file marker.cc.

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

◆ MarkingWorklistsForTesting()

MarkingWorklists & cppgc::internal::MarkerBase::MarkingWorklistsForTesting ( )
inline

Definition at line 141 of file marker.h.

◆ MarkNotFullyConstructedObjects()

void cppgc::internal::MarkerBase::MarkNotFullyConstructedObjects ( )
protected

Definition at line 746 of file marker.cc.

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

◆ MarkStrongCrossThreadRoots()

void cppgc::internal::MarkerBase::MarkStrongCrossThreadRoots ( )
protected

Definition at line 538 of file marker.cc.

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

◆ MutatorMarkingStateForTesting()

MutatorMarkingState & cppgc::internal::MarkerBase::MutatorMarkingStateForTesting ( )
inline

Definition at line 142 of file marker.h.

◆ NotifyConcurrentMarkingOfWorkIfNeeded()

void cppgc::internal::MarkerBase::NotifyConcurrentMarkingOfWorkIfNeeded ( cppgc::TaskPriority priority)

Definition at line 592 of file marker.cc.

Here is the call graph for this function:

◆ operator=()

MarkerBase & cppgc::internal::MarkerBase::operator= ( const MarkerBase & )
delete

◆ ProcessCrossThreadWeaknessIfNeeded()

void cppgc::internal::MarkerBase::ProcessCrossThreadWeaknessIfNeeded ( )

Definition at line 374 of file marker.cc.

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

◆ ProcessWeakness()

void cppgc::internal::MarkerBase::ProcessWeakness ( )

Definition at line 397 of file marker.cc.

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

◆ ProcessWorklistsWithDeadline()

bool cppgc::internal::MarkerBase::ProcessWorklistsWithDeadline ( size_t marked_bytes_deadline,
v8::base::TimeTicks time_deadline )
protected

Definition at line 644 of file marker.cc.

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

◆ ReEnableConcurrentMarking()

void cppgc::internal::MarkerBase::ReEnableConcurrentMarking ( )

Definition at line 292 of file marker.cc.

Here is the call graph for this function:

◆ schedule()

virtual heap::base::IncrementalMarkingSchedule & cppgc::internal::MarkerBase::schedule ( )
protectedpure virtual

Implemented in cppgc::internal::Marker, and v8::internal::UnifiedHeapMarker.

Here is the caller graph for this function:

◆ ScheduleIncrementalMarkingTask()

void cppgc::internal::MarkerBase::ScheduleIncrementalMarkingTask ( )
protectedvirtual

Reimplemented in v8::internal::UnifiedHeapMarker.

Definition at line 545 of file marker.cc.

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

◆ SetMainThreadMarkingDisabledForTesting()

void cppgc::internal::MarkerBase::SetMainThreadMarkingDisabledForTesting ( bool value)

Definition at line 773 of file marker.cc.

Here is the caller graph for this function:

◆ stack_visitor()

virtual heap::base::StackVisitor & cppgc::internal::MarkerBase::stack_visitor ( )
protectedpure virtual

Implemented in cppgc::internal::Marker, and v8::internal::UnifiedHeapMarker.

Here is the caller graph for this function:

◆ StartMarking()

void cppgc::internal::MarkerBase::StartMarking ( )

Definition at line 211 of file marker.cc.

Here is the call graph for this function:

◆ To()

template<typename Class >
Class & cppgc::internal::MarkerBase::To ( )
inline

Definition at line 71 of file marker.h.

Here is the caller graph for this function:

◆ VisitCrossThreadRoots()

void cppgc::internal::MarkerBase::VisitCrossThreadRoots ( )
protected

Definition at line 522 of file marker.cc.

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

◆ VisitLocalRoots()

void cppgc::internal::MarkerBase::VisitLocalRoots ( StackState stack_state)
protected

Definition at line 489 of file marker.cc.

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

◆ Visitor()

cppgc::Visitor & cppgc::internal::MarkerBase::Visitor ( )
inline

Definition at line 132 of file marker.h.

◆ visitor()

virtual cppgc::Visitor & cppgc::internal::MarkerBase::visitor ( )
protectedpure virtual

Implemented in cppgc::internal::Marker, and v8::internal::UnifiedHeapMarker.

Here is the caller graph for this function:

◆ WaitForConcurrentMarkingForTesting()

void cppgc::internal::MarkerBase::WaitForConcurrentMarkingForTesting ( )

Definition at line 777 of file marker.cc.

Here is the call graph for this function:

◆ WriteBarrierForObject()

void cppgc::internal::MarkerBase::WriteBarrierForObject ( HeapObjectHeader & header)
inline

Definition at line 242 of file marker.h.

Here is the call graph for this function:

Member Data Documentation

◆ config_

MarkingConfig cppgc::internal::MarkerBase::config_ = MarkingConfig::Default()
protected

Definition at line 199 of file marker.h.

◆ foreground_task_runner_

std::shared_ptr<cppgc::TaskRunner> cppgc::internal::MarkerBase::foreground_task_runner_
protected

Definition at line 201 of file marker.h.

◆ heap_

HeapBase& cppgc::internal::MarkerBase::heap_
protected

Definition at line 198 of file marker.h.

◆ incremental_marking_allocation_observer_

IncrementalMarkingAllocationObserver cppgc::internal::MarkerBase::incremental_marking_allocation_observer_
protected

Definition at line 203 of file marker.h.

◆ incremental_marking_handle_

IncrementalMarkingTaskHandle cppgc::internal::MarkerBase::incremental_marking_handle_
protected

Definition at line 202 of file marker.h.

◆ is_marking_

bool cppgc::internal::MarkerBase::is_marking_ {false}
protected

Definition at line 207 of file marker.h.

◆ kMaximumIncrementalStepDuration

v8::base::TimeDelta cppgc::internal::MarkerBase::kMaximumIncrementalStepDuration
staticconstexprprotected
Initial value:
=
static constexpr TimeDelta FromMilliseconds(int64_t milliseconds)
Definition time.h:84

Definition at line 163 of file marker.h.

◆ last_bytes_marked_

size_t cppgc::internal::MarkerBase::last_bytes_marked_ = 0
protected

Definition at line 206 of file marker.h.

◆ main_marking_disabled_for_testing_

bool cppgc::internal::MarkerBase::main_marking_disabled_for_testing_ {false}
protected

Definition at line 208 of file marker.h.

◆ marking_worklists_

MarkingWorklists cppgc::internal::MarkerBase::marking_worklists_
protected

Definition at line 204 of file marker.h.

◆ mutator_marking_state_

MutatorMarkingState cppgc::internal::MarkerBase::mutator_marking_state_
protected

Definition at line 205 of file marker.h.

◆ platform_

cppgc::Platform* cppgc::internal::MarkerBase::platform_
protected

Definition at line 200 of file marker.h.

◆ processed_cross_thread_weakness_

bool cppgc::internal::MarkerBase::processed_cross_thread_weakness_ {false}
protected

Definition at line 210 of file marker.h.

◆ visited_cross_thread_persistents_in_atomic_pause_

bool cppgc::internal::MarkerBase::visited_cross_thread_persistents_in_atomic_pause_ {false}
protected

Definition at line 209 of file marker.h.


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