Enum mmtk::scheduler::WorkBucketStage

source ·
pub enum WorkBucketStage {
Show 18 variants Unconstrained, Prepare, 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.

§

Prepare

Preparation work. Plans, spaces, GC workers, mutators, etc. should be prepared for GC at this stage.

§

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

source

pub fn first_stw_stage() -> Self

The first stop-the-world bucket.

Trait Implementations§

source§

impl Clone for WorkBucketStage

source§

fn clone(&self) -> WorkBucketStage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WorkBucketStage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Enum for WorkBucketStage

source§

const LENGTH: usize = 18usize

Length of the enum.
source§

fn from_usize(value: usize) -> Self

Takes an usize, and returns an element matching into_usize function.
source§

fn into_usize(self) -> usize

Returns an unique identifier for a value within range of 0..Array::LENGTH.
source§

impl<V> EnumArray<V> for WorkBucketStage

§

type Array = [V; 18]

Representation of an enum map for type V.
source§

impl PartialEq for WorkBucketStage

source§

fn eq(&self, other: &WorkBucketStage) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for WorkBucketStage

source§

impl Eq for WorkBucketStage

source§

impl StructuralPartialEq for WorkBucketStage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.