mmtk::plan::markcompact::gc_work

Type Alias MarkingProcessEdges

source
pub type MarkingProcessEdges<VM> = PlanProcessEdges<VM, MarkCompact<VM>, TRACE_KIND_MARK>;
Expand description

Marking trace

Aliased Type§

struct MarkingProcessEdges<VM> {
    plan: &'static MarkCompact<VM>,
    base: ProcessEdgesBase<VM>,
}

Fields§

§plan: &'static MarkCompact<VM>§base: ProcessEdgesBase<VM>

Trait Implementations

source§

impl<VM: VMBinding, P: PlanTraceObject<VM> + Plan<VM = VM>, const KIND: u8> DerefMut for PlanProcessEdges<VM, P, KIND>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<VM: VMBinding, P: PlanTraceObject<VM> + Plan<VM = VM>, const KIND: u8> ProcessEdgesWork for PlanProcessEdges<VM, P, KIND>

source§

type VM = VM

The associate type for the VM.
source§

type ScanObjectsWorkType = PlanScanObjects<PlanProcessEdges<VM, P, KIND>, P>

The work packet type for scanning objects when using this ProcessEdgesWork.
source§

fn new( slots: Vec<<<Self as ProcessEdgesWork>::VM as VMBinding>::VMSlot>, roots: bool, mmtk: &'static MMTK<VM>, bucket: WorkBucketStage, ) -> Self

source§

fn create_scan_work( &self, nodes: Vec<ObjectReference>, ) -> Self::ScanObjectsWorkType

Create an object-scanning work packet to be used for this ProcessEdgesWork. Read more
source§

fn trace_object(&mut self, object: ObjectReference) -> ObjectReference

Trace an MMTk object. The implementation should forward this call to the policy-specific trace_object() methods, depending on which space this object is in. If the object is not in any MMTk space, the implementation should forward the call to ActivePlan::vm_trace_object() to let the binding handle the tracing.
source§

fn process_slot( &mut self, slot: <<Self as ProcessEdgesWork>::VM as VMBinding>::VMSlot, )

Process a slot, including loading the object reference from the memory slot, trace the object and store back the new object reference if necessary.
source§

const CAPACITY: usize = 4_096usize

The maximum number of slots that should be put to one of this work packets. The caller who creates a work packet of this trait should be responsible to comply with this capacity. Higher capacity means the packet will take longer to finish, and may lead to bad load balancing. On the other hand, lower capacity would lead to higher cost on scheduling many small work packets. It is important to find a proper capacity.
source§

const OVERWRITE_REFERENCE: bool = true

Do we update object reference? This has to be true for a moving GC.
source§

const SCAN_OBJECTS_IMMEDIATELY: bool = true

If true, we do object scanning in this work packet with the same worker without scheduling overhead. If false, we will add object scanning work packets to the global queue and allow other workers to work on it.
source§

fn cache_roots_for_sanity_gc(&mut self)

If the work includes roots, we will store the roots somewhere so for sanity GC, we can do another transitive closure from the roots.
source§

fn start_or_dispatch_scan_work(&mut self, work_packet: impl GCWork<Self::VM>)

Start the a scan work packet. If SCAN_OBJECTS_IMMEDIATELY, the work packet will be executed immediately, in this method. Otherwise, the work packet will be added the Closure work bucket and will be dispatched later by the scheduler.
source§

fn flush(&mut self)

Flush the nodes in ProcessEdgesBase, and create a ScanObjects work packet for it. If the node set is empty, this method will simply return with no work packet created.
source§

fn process_slots(&mut self)

Process all the slots in the work packet.
source§

impl<VM: VMBinding, P: PlanTraceObject<VM> + Plan<VM = VM>, const KIND: u8> Deref for PlanProcessEdges<VM, P, KIND>

source§

type Target = ProcessEdgesBase<VM>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.