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

#include <incremental-marking.h>

Collaboration diagram for v8::internal::IncrementalMarking:

Classes

class  Observer
 

Public Member Functions

 IncrementalMarking (Heap *heap, WeakObjects *weak_objects)
 
 IncrementalMarking (const IncrementalMarking &)=delete
 
IncrementalMarkingoperator= (const IncrementalMarking &)=delete
 
MarkingMode marking_mode () const
 
bool IsMinorMarking () const
 
bool IsMajorMarking () const
 
bool IsStopped () const
 
bool IsMarking () const
 
bool IsMajorMarkingComplete () const
 
bool MajorCollectionRequested () const
 
bool CanAndShouldBeStarted () const
 
void Start (GarbageCollector garbage_collector, GarbageCollectionReason gc_reason)
 
bool Stop ()
 
void AdvanceAndFinalizeIfComplete ()
 
void AdvanceAndFinalizeIfNecessary ()
 
void AdvanceOnAllocation ()
 
bool IsCompacting ()
 
Heapheap () const
 
Isolateisolate () const
 
IncrementalMarkingJobincremental_marking_job () const
 
bool black_allocation ()
 
bool IsBelowActivationThresholds () const
 
void MarkBlackBackground (Tagged< HeapObject > obj, int object_size)
 
void MarkRootsForTesting ()
 
void AdvanceForTesting (v8::base::TimeDelta max_duration, size_t max_bytes_to_mark=SIZE_MAX)
 
uint64_t current_trace_id () const
 
std::shared_ptr<::heap::base::IncrementalMarkingScheduleschedule ()
 

Private Member Functions

void StartMarkingMajor ()
 
void StartMarkingMinor ()
 
bool CanBeStarted () const
 
void StartBlackAllocation ()
 
void PauseBlackAllocation ()
 
void FinishBlackAllocation ()
 
void StartPointerTableBlackAllocation ()
 
void StopPointerTableBlackAllocation ()
 
void MarkRoots ()
 
void PublishWriteBarrierWorklists ()
 
void FetchBytesMarkedConcurrently ()
 
size_t GetScheduledBytes (StepOrigin step_origin)
 
bool ShouldFinalize () const
 
bool ShouldWaitForTask ()
 
bool TryInitializeTaskTimeout ()
 
std::pair< v8::base::TimeDelta, size_tCppHeapStep (v8::base::TimeDelta max_duration, size_t marked_bytes_limit)
 
void Step (v8::base::TimeDelta max_duration, size_t max_bytes_to_process, StepOrigin step_origin)
 
size_t OldGenerationSizeOfObjects () const
 
MarkingStatemarking_state ()
 
MarkingWorklists::Locallocal_marking_worklists () const
 

Private Attributes

Heap *const heap_
 
MarkCompactCollector *const major_collector_
 
MinorMarkSweepCollector *const minor_collector_
 
WeakObjectsweak_objects_
 
MarkingWorklists::Localcurrent_local_marking_worklists_ = nullptr
 
MarkingState *const marking_state_
 
v8::base::TimeTicks start_time_
 
size_t main_thread_marked_bytes_ = 0
 
size_t bytes_marked_concurrently_ = 0
 
MarkingMode marking_mode_ = MarkingMode::kNoMarking
 
bool is_compacting_ = false
 
bool black_allocation_ = false
 
bool completion_task_scheduled_ = false
 
v8::base::TimeTicks completion_task_timeout_
 
bool major_collection_requested_via_stack_guard_ = false
 
std::unique_ptr< IncrementalMarkingJobincremental_marking_job_
 
Observer new_generation_observer_
 
Observer old_generation_observer_
 
base::Mutex background_live_bytes_mutex_
 
std::unordered_map< MutablePageMetadata *, intptr_t, base::hash< MutablePageMetadata * > > background_live_bytes_
 
std::shared_ptr<::heap::base::IncrementalMarkingScheduleschedule_
 
std::optional< uint64_t > current_trace_id_
 

Friends

class IncrementalMarkingJob
 

Detailed Description

Definition at line 54 of file incremental-marking.h.

Constructor & Destructor Documentation

◆ IncrementalMarking() [1/2]

v8::internal::IncrementalMarking::IncrementalMarking ( Heap * heap,
WeakObjects * weak_objects )

Definition at line 93 of file incremental-marking.cc.

◆ IncrementalMarking() [2/2]

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

Member Function Documentation

◆ AdvanceAndFinalizeIfComplete()

void v8::internal::IncrementalMarking::AdvanceAndFinalizeIfComplete ( )

Definition at line 676 of file incremental-marking.cc.

Here is the call graph for this function:

◆ AdvanceAndFinalizeIfNecessary()

void v8::internal::IncrementalMarking::AdvanceAndFinalizeIfNecessary ( )

Definition at line 686 of file incremental-marking.cc.

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

◆ AdvanceForTesting()

void v8::internal::IncrementalMarking::AdvanceForTesting ( v8::base::TimeDelta max_duration,
size_t max_bytes_to_mark = SIZE_MAX )

Definition at line 696 of file incremental-marking.cc.

Here is the call graph for this function:

◆ AdvanceOnAllocation()

void v8::internal::IncrementalMarking::AdvanceOnAllocation ( )

Definition at line 701 of file incremental-marking.cc.

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

◆ black_allocation()

bool v8::internal::IncrementalMarking::black_allocation ( )
inline

Definition at line 109 of file incremental-marking.h.

Here is the caller graph for this function:

◆ CanAndShouldBeStarted()

bool v8::internal::IncrementalMarking::CanAndShouldBeStarted ( ) const

Definition at line 116 of file incremental-marking.cc.

Here is the call graph for this function:

◆ CanBeStarted()

bool v8::internal::IncrementalMarking::CanBeStarted ( ) const
private

Definition at line 120 of file incremental-marking.cc.

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

◆ CppHeapStep()

std::pair< v8::base::TimeDelta, size_t > v8::internal::IncrementalMarking::CppHeapStep ( v8::base::TimeDelta max_duration,
size_t marked_bytes_limit )
private

Definition at line 472 of file incremental-marking.cc.

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

◆ current_trace_id()

uint64_t v8::internal::IncrementalMarking::current_trace_id ( ) const
inline

Definition at line 121 of file incremental-marking.h.

◆ FetchBytesMarkedConcurrently()

void v8::internal::IncrementalMarking::FetchBytesMarkedConcurrently ( )
private

Definition at line 732 of file incremental-marking.cc.

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

◆ FinishBlackAllocation()

void v8::internal::IncrementalMarking::FinishBlackAllocation ( )
private

Definition at line 423 of file incremental-marking.cc.

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

◆ GetScheduledBytes()

size_t v8::internal::IncrementalMarking::GetScheduledBytes ( StepOrigin step_origin)
private

Definition at line 646 of file incremental-marking.cc.

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

◆ heap()

Heap * v8::internal::IncrementalMarking::heap ( ) const
inline

Definition at line 102 of file incremental-marking.h.

Here is the caller graph for this function:

◆ incremental_marking_job()

IncrementalMarkingJob * v8::internal::IncrementalMarking::incremental_marking_job ( ) const
inline

Definition at line 105 of file incremental-marking.h.

Here is the caller graph for this function:

◆ IsBelowActivationThresholds()

bool v8::internal::IncrementalMarking::IsBelowActivationThresholds ( ) const

Definition at line 130 of file incremental-marking.cc.

Here is the call graph for this function:

◆ IsCompacting()

bool v8::internal::IncrementalMarking::IsCompacting ( )
inline

Definition at line 100 of file incremental-marking.h.

Here is the caller graph for this function:

◆ IsMajorMarking()

bool v8::internal::IncrementalMarking::IsMajorMarking ( ) const
inline

Definition at line 66 of file incremental-marking.h.

Here is the caller graph for this function:

◆ IsMajorMarkingComplete()

bool v8::internal::IncrementalMarking::IsMajorMarkingComplete ( ) const
inline

Definition at line 72 of file incremental-marking.h.

Here is the caller graph for this function:

◆ IsMarking()

bool v8::internal::IncrementalMarking::IsMarking ( ) const
inline

Definition at line 71 of file incremental-marking.h.

Here is the caller graph for this function:

◆ IsMinorMarking()

bool v8::internal::IncrementalMarking::IsMinorMarking ( ) const
inline

Definition at line 63 of file incremental-marking.h.

Here is the caller graph for this function:

◆ isolate()

Isolate * v8::internal::IncrementalMarking::isolate ( ) const

Definition at line 865 of file incremental-marking.cc.

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

◆ IsStopped()

bool v8::internal::IncrementalMarking::IsStopped ( ) const
inline

Definition at line 70 of file incremental-marking.h.

Here is the caller graph for this function:

◆ local_marking_worklists()

MarkingWorklists::Local * v8::internal::IncrementalMarking::local_marking_worklists ( ) const
inlineprivate

Definition at line 174 of file incremental-marking.h.

Here is the caller graph for this function:

◆ MajorCollectionRequested()

bool v8::internal::IncrementalMarking::MajorCollectionRequested ( ) const
inline

Definition at line 76 of file incremental-marking.h.

◆ MarkBlackBackground()

void v8::internal::IncrementalMarking::MarkBlackBackground ( Tagged< HeapObject > obj,
int object_size )

Definition at line 108 of file incremental-marking.cc.

Here is the call graph for this function:

◆ marking_mode()

MarkingMode v8::internal::IncrementalMarking::marking_mode ( ) const
inline

Definition at line 61 of file incremental-marking.h.

Here is the caller graph for this function:

◆ marking_state()

MarkingState * v8::internal::IncrementalMarking::marking_state ( )
inlineprivate

Definition at line 173 of file incremental-marking.h.

Here is the caller graph for this function:

◆ MarkRoots()

void v8::internal::IncrementalMarking::MarkRoots ( )
private

Definition at line 214 of file incremental-marking.cc.

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

◆ MarkRootsForTesting()

void v8::internal::IncrementalMarking::MarkRootsForTesting ( )

Definition at line 238 of file incremental-marking.cc.

Here is the call graph for this function:

◆ OldGenerationSizeOfObjects()

size_t v8::internal::IncrementalMarking::OldGenerationSizeOfObjects ( ) const
private

Definition at line 549 of file incremental-marking.cc.

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

◆ operator=()

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

◆ PauseBlackAllocation()

void v8::internal::IncrementalMarking::PauseBlackAllocation ( )
private

Definition at line 399 of file incremental-marking.cc.

Here is the call graph for this function:

◆ PublishWriteBarrierWorklists()

void v8::internal::IncrementalMarking::PublishWriteBarrierWorklists ( )
private

◆ schedule()

std::shared_ptr<::heap::base::IncrementalMarkingSchedule > v8::internal::IncrementalMarking::schedule ( )
inline

Definition at line 123 of file incremental-marking.h.

◆ ShouldFinalize()

bool v8::internal::IncrementalMarking::ShouldFinalize ( ) const
private

Definition at line 721 of file incremental-marking.cc.

Here is the call graph for this function:

◆ ShouldWaitForTask()

bool v8::internal::IncrementalMarking::ShouldWaitForTask ( )
private

Definition at line 570 of file incremental-marking.cc.

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

◆ Start()

void v8::internal::IncrementalMarking::Start ( GarbageCollector garbage_collector,
GarbageCollectionReason gc_reason )

Definition at line 135 of file incremental-marking.cc.

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

◆ StartBlackAllocation()

void v8::internal::IncrementalMarking::StartBlackAllocation ( )
private

Definition at line 362 of file incremental-marking.cc.

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

◆ StartMarkingMajor()

void v8::internal::IncrementalMarking::StartMarkingMajor ( )
private

Definition at line 240 of file incremental-marking.cc.

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

◆ StartMarkingMinor()

void v8::internal::IncrementalMarking::StartMarkingMinor ( )
private

Definition at line 318 of file incremental-marking.cc.

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

◆ StartPointerTableBlackAllocation()

void v8::internal::IncrementalMarking::StartPointerTableBlackAllocation ( )
private

Definition at line 437 of file incremental-marking.cc.

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

◆ Step()

void v8::internal::IncrementalMarking::Step ( v8::base::TimeDelta max_duration,
size_t max_bytes_to_process,
StepOrigin step_origin )
private

Definition at line 747 of file incremental-marking.cc.

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

◆ Stop()

bool v8::internal::IncrementalMarking::Stop ( )

Definition at line 486 of file incremental-marking.cc.

Here is the call graph for this function:

◆ StopPointerTableBlackAllocation()

void v8::internal::IncrementalMarking::StopPointerTableBlackAllocation ( )
private

Definition at line 454 of file incremental-marking.cc.

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

◆ TryInitializeTaskTimeout()

bool v8::internal::IncrementalMarking::TryInitializeTaskTimeout ( )
private

Definition at line 594 of file incremental-marking.cc.

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

Friends And Related Symbol Documentation

◆ IncrementalMarkingJob

friend class IncrementalMarkingJob
friend

Definition at line 206 of file incremental-marking.h.

Member Data Documentation

◆ background_live_bytes_

std::unordered_map<MutablePageMetadata*, intptr_t, base::hash<MutablePageMetadata*> > v8::internal::IncrementalMarking::background_live_bytes_
private

Definition at line 202 of file incremental-marking.h.

◆ background_live_bytes_mutex_

base::Mutex v8::internal::IncrementalMarking::background_live_bytes_mutex_
private

Definition at line 199 of file incremental-marking.h.

◆ black_allocation_

bool v8::internal::IncrementalMarking::black_allocation_ = false
private

Definition at line 192 of file incremental-marking.h.

◆ bytes_marked_concurrently_

size_t v8::internal::IncrementalMarking::bytes_marked_concurrently_ = 0
private

Definition at line 188 of file incremental-marking.h.

◆ completion_task_scheduled_

bool v8::internal::IncrementalMarking::completion_task_scheduled_ = false
private

Definition at line 193 of file incremental-marking.h.

◆ completion_task_timeout_

v8::base::TimeTicks v8::internal::IncrementalMarking::completion_task_timeout_
private

Definition at line 194 of file incremental-marking.h.

◆ current_local_marking_worklists_

MarkingWorklists::Local* v8::internal::IncrementalMarking::current_local_marking_worklists_ = nullptr
private

Definition at line 182 of file incremental-marking.h.

◆ current_trace_id_

std::optional<uint64_t> v8::internal::IncrementalMarking::current_trace_id_
private

Definition at line 204 of file incremental-marking.h.

◆ heap_

Heap* const v8::internal::IncrementalMarking::heap_
private

Definition at line 178 of file incremental-marking.h.

◆ incremental_marking_job_

std::unique_ptr<IncrementalMarkingJob> v8::internal::IncrementalMarking::incremental_marking_job_
private

Definition at line 196 of file incremental-marking.h.

◆ is_compacting_

bool v8::internal::IncrementalMarking::is_compacting_ = false
private

Definition at line 191 of file incremental-marking.h.

◆ main_thread_marked_bytes_

size_t v8::internal::IncrementalMarking::main_thread_marked_bytes_ = 0
private

Definition at line 185 of file incremental-marking.h.

◆ major_collection_requested_via_stack_guard_

bool v8::internal::IncrementalMarking::major_collection_requested_via_stack_guard_ = false
private

Definition at line 195 of file incremental-marking.h.

◆ major_collector_

MarkCompactCollector* const v8::internal::IncrementalMarking::major_collector_
private

Definition at line 179 of file incremental-marking.h.

◆ marking_mode_

MarkingMode v8::internal::IncrementalMarking::marking_mode_ = MarkingMode::kNoMarking
private

Definition at line 189 of file incremental-marking.h.

◆ marking_state_

MarkingState* const v8::internal::IncrementalMarking::marking_state_
private

Definition at line 183 of file incremental-marking.h.

◆ minor_collector_

MinorMarkSweepCollector* const v8::internal::IncrementalMarking::minor_collector_
private

Definition at line 180 of file incremental-marking.h.

◆ new_generation_observer_

Observer v8::internal::IncrementalMarking::new_generation_observer_
private

Definition at line 197 of file incremental-marking.h.

◆ old_generation_observer_

Observer v8::internal::IncrementalMarking::old_generation_observer_
private

Definition at line 198 of file incremental-marking.h.

◆ schedule_

std::shared_ptr<::heap::base::IncrementalMarkingSchedule> v8::internal::IncrementalMarking::schedule_
private

Definition at line 203 of file incremental-marking.h.

◆ start_time_

v8::base::TimeTicks v8::internal::IncrementalMarking::start_time_
private

Definition at line 184 of file incremental-marking.h.

◆ weak_objects_

WeakObjects* v8::internal::IncrementalMarking::weak_objects_
private

Definition at line 181 of file incremental-marking.h.


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