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>
impl<VM: VMBinding, P: ConcurrentPlan<VM = VM> + PlanTraceObject<VM>, const KIND: u8> SATBBarrierSemantics<VM, P, KIND>
pub fn new(mmtk: &'static MMTK<VM>, tls: VMMutatorThread) -> Self
fn slow( &mut self, _src: Option<ObjectReference>, _slot: VM::VMSlot, old: ObjectReference, )
fn enqueue_node( &mut self, src: Option<ObjectReference>, slot: VM::VMSlot, _new: Option<ObjectReference>, ) -> bool
sourcefn log_object(&self, object: ObjectReference) -> bool
fn log_object(&self, object: ObjectReference) -> bool
Attempt to atomically log an object. Returns true if the object is not logged previously.
fn flush_satb(&mut self)
fn flush_weak_refs(&mut self)
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>
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)
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
.
type VM = VM
source§fn flush(&mut self)
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>,
)
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,
)
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)
fn object_probable_write_slow(&mut self, obj: ObjectReference)
Object will probably be modified
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> 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
Mutably borrows from an owned value. Read more
§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>
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>
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)
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)
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
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>
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 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>
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