pub enum WorkBucketStage {
Show 20 variants
Unconstrained,
Concurrent,
Prepare,
ClearVOBits,
TPinningClosure,
PinningRootsTrace,
Closure,
SoftRefClosure,
WeakRefClosure,
FinalRefClosure,
PhantomRefClosure,
VMRefClosure,
CalculateForwarding,
SecondRoots,
RefForwarding,
FinalizableForwarding,
VMRefForwarding,
Compact,
Release,
Final,
}
Expand description
This enum defines all the work bucket types. The scheduler will instantiate a work bucket for each stage defined here.
Variants§
Unconstrained
This bucket is always open.
Concurrent
This bucket is intended for concurrent work. Though some concurrent work may be put and executed in the unconstrained bucket, work in the unconstrained bucket will always be consumed during STW. Users can disable this bucket and cache some concurrent work during STW, and only enable this bucket and allow concurrent execution once a STW is done.
Prepare
Preparation work. Plans, spaces, GC workers, mutators, etc. should be prepared for GC at this stage.
ClearVOBits
Clear the VO bit metadata. Mainly used by ImmixSpace.
TPinningClosure
Compute the transtive closure starting from transitively pinning (TP) roots following only strong references. No objects in this closure are allow to move.
PinningRootsTrace
Trace (non-transitively) pinning roots. Objects pointed by those roots must not move, but their children may. To ensure correctness, these must be processed after TPinningClosure
Closure
Compute the transtive closure following only strong references.
SoftRefClosure
Handle Java-style soft references, and potentially expand the transitive closure.
WeakRefClosure
Handle Java-style weak references.
FinalRefClosure
Resurrect Java-style finalizable objects, and potentially expand the transitive closure.
PhantomRefClosure
Handle Java-style phantom references.
VMRefClosure
Let the VM handle VM-specific weak data structures, including weak references, weak collections, table of finalizable objects, ephemerons, etc. Potentially expand the transitive closure.
NOTE: This stage is intended to replace the Java-specific weak reference handling stages above.
CalculateForwarding
Compute the forwarding addresses of objects (mark-compact-only).
SecondRoots
Scan roots again to initiate another transitive closure to update roots and reference after computing the forwarding addresses (mark-compact-only).
RefForwarding
Update Java-style weak references after computing forwarding addresses (mark-compact-only).
NOTE: This stage should be updated to adapt to the VM-side reference handling. It shall
be kept after removing {Soft,Weak,Final,Phantom}RefClosure
.
FinalizableForwarding
Update the list of Java-style finalization cadidates and finalizable objects after computing forwarding addresses (mark-compact-only).
VMRefForwarding
Let the VM handle the forwarding of reference fields in any VM-specific weak data structures, including weak references, weak collections, table of finalizable objects, ephemerons, etc., after computing forwarding addresses (mark-compact-only).
NOTE: This stage is intended to replace Java-specific forwarding phases above.
Compact
Compact objects (mark-compact-only).
Release
Work packets that should be done just before GC shall go here. This includes releasing resources and setting states in plans, spaces, GC workers, mutators, etc.
Final
Resume mutators and end GC.
Implementations§
source§impl WorkBucketStage
impl WorkBucketStage
sourcepub const FIRST_STW_STAGE: Self = WorkBucketStage::Prepare
pub const FIRST_STW_STAGE: Self = WorkBucketStage::Prepare
The first stop-the-world stage. This stage has no open condition, and will be opened manually once all the mutators threads are stopped.
sourcepub const fn is_first_stw_stage(&self) -> bool
pub const fn is_first_stw_stage(&self) -> bool
Is this the first stop-the-world stage? See Self::FIRST_STW_STAGE
.
sourcepub const fn is_always_open(&self) -> bool
pub const fn is_always_open(&self) -> bool
Is this stage always open?
sourcepub const fn is_open_by_default(&self) -> bool
pub const fn is_open_by_default(&self) -> bool
Is this stage open by default?
sourcepub const fn is_enabled_by_default(&self) -> bool
pub const fn is_enabled_by_default(&self) -> bool
Is this stage enabled by default?
sourcepub const fn is_sequentially_opened(&self) -> bool
pub const fn is_sequentially_opened(&self) -> bool
Is this stage sequentially opened? All the stop-the-world stages, except the first one, are sequentially opened.
sourcepub const fn is_concurrent(&self) -> bool
pub const fn is_concurrent(&self) -> bool
Is this stage concurrent (which may be executed during mutator time)?
Trait Implementations§
source§impl Clone for WorkBucketStage
impl Clone for WorkBucketStage
source§fn clone(&self) -> WorkBucketStage
fn clone(&self) -> WorkBucketStage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WorkBucketStage
impl Debug for WorkBucketStage
source§impl Enum for WorkBucketStage
impl Enum for WorkBucketStage
source§impl<V> EnumArray<V> for WorkBucketStage
impl<V> EnumArray<V> for WorkBucketStage
source§impl PartialEq for WorkBucketStage
impl PartialEq for WorkBucketStage
impl Copy for WorkBucketStage
impl Eq for WorkBucketStage
impl StructuralPartialEq for WorkBucketStage
Auto Trait Implementations§
impl Freeze for WorkBucketStage
impl RefUnwindSafe for WorkBucketStage
impl Send for WorkBucketStage
impl Sync for WorkBucketStage
impl Unpin for WorkBucketStage
impl UnwindSafe for WorkBucketStage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more