mmtk::plan::concurrent::barrier

Struct SATBBarrierSemantics

source
pub struct SATBBarrierSemantics<VM: VMBinding, P: ConcurrentPlan<VM = VM> + PlanTraceObject<VM>, const KIND: u8> {
    mmtk: &'static MMTK<VM>,
    tls: VMMutatorThread,
    satb: VectorQueue<ObjectReference>,
    refs: VectorQueue<ObjectReference>,
    plan: &'static P,
}

Fields§

§mmtk: &'static MMTK<VM>§tls: VMMutatorThread§satb: VectorQueue<ObjectReference>§refs: VectorQueue<ObjectReference>§plan: &'static P

Implementations§

source§

impl<VM: VMBinding, P: ConcurrentPlan<VM = VM> + PlanTraceObject<VM>, const KIND: u8> SATBBarrierSemantics<VM, P, KIND>

source

pub fn new(mmtk: &'static MMTK<VM>, tls: VMMutatorThread) -> Self

source

fn slow( &mut self, _src: Option<ObjectReference>, _slot: VM::VMSlot, old: ObjectReference, )

source

fn enqueue_node( &mut self, src: Option<ObjectReference>, slot: VM::VMSlot, _new: Option<ObjectReference>, ) -> bool

source

fn log_object(&self, object: ObjectReference) -> bool

Attempt to atomically log an object. Returns true if the object is not logged previously.

source

fn flush_satb(&mut self)

source

fn flush_weak_refs(&mut self)

source

fn should_create_satb_packets(&self) -> bool

Trait Implementations§

source§

impl<VM: VMBinding, P: ConcurrentPlan<VM = VM> + PlanTraceObject<VM>, const KIND: u8> BarrierSemantics for SATBBarrierSemantics<VM, P, KIND>

source§

fn load_weak_reference(&mut self, o: ObjectReference)

Enqueue the referent during concurrent marking.

Note: During concurrent marking, a collector based on snapshot-at-the-beginning (SATB) will not reach objects that were weakly reachable at the time of InitialMark. But if a mutator loads from a weak reference field during concurrent marking, it will make the referent strongly reachable, yet the referent is still not part of the SATB. We must conservatively enqueue the referent even though its reachability has not yet been established, otherwise it (and its children) may be treated as garbage if it happened to be weakly reachable at the time of InitialMark.

source§

type VM = VM

source§

fn flush(&mut self)

Flush thread-local buffers or remembered sets. Normally this is called by the slow-path implementation whenever the thread-local buffers are full. This will also be called externally by the VM, when the thread is being destroyed.
source§

fn object_reference_write_slow( &mut self, src: ObjectReference, _slot: <Self::VM as VMBinding>::VMSlot, _target: Option<ObjectReference>, )

Slow-path call for object field write operations.
source§

fn memory_region_copy_slow( &mut self, _src: <Self::VM as VMBinding>::VMMemorySlice, dst: <Self::VM as VMBinding>::VMMemorySlice, )

Slow-path call for mempry slice copy operations. For example, array-copy operations.
source§

fn object_probable_write_slow(&mut self, obj: ObjectReference)

Object will probably be modified
source§

const UNLOG_BIT_SPEC: MetadataSpec = _

Auto Trait Implementations§

§

impl<VM, P, const KIND: u8> Freeze for SATBBarrierSemantics<VM, P, KIND>

§

impl<VM, P, const KIND: u8> !RefUnwindSafe for SATBBarrierSemantics<VM, P, KIND>

§

impl<VM, P, const KIND: u8> Send for SATBBarrierSemantics<VM, P, KIND>

§

impl<VM, P, const KIND: u8> Sync for SATBBarrierSemantics<VM, P, KIND>

§

impl<VM, P, const KIND: u8> Unpin for SATBBarrierSemantics<VM, P, KIND>

§

impl<VM, P, const KIND: u8> !UnwindSafe for SATBBarrierSemantics<VM, P, KIND>

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
§

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

§

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

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

Converts 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)

Converts &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)

Converts &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
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

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

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

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

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be 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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

source§

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>,

source§

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.