Skip to content

Commit

Permalink
Node-enqueuing tracing.
Browse files Browse the repository at this point in the history
This commit implements node-enqueuing tracing.  This is mainly for
supporting VMs that does not support edge-enqueuing for some or all
objects.
  • Loading branch information
wks committed Jul 21, 2022
1 parent 9a3ebff commit 57716df
Show file tree
Hide file tree
Showing 5 changed files with 297 additions and 60 deletions.
6 changes: 6 additions & 0 deletions src/plan/generational/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub struct GenNurseryProcessEdges<VM: VMBinding> {

impl<VM: VMBinding> ProcessEdgesWork for GenNurseryProcessEdges<VM> {
type VM = VM;
type ScanObjectsWorkType = ScanObjects<Self>;

fn new(edges: Vec<Address>, roots: bool, mmtk: &'static MMTK<VM>) -> Self {
let base = ProcessEdgesBase::new(edges, roots, mmtk);
Expand All @@ -39,6 +40,11 @@ impl<VM: VMBinding> ProcessEdgesWork for GenNurseryProcessEdges<VM> {
debug_assert!(!self.gen.nursery.in_space(new_object));
unsafe { slot.store(new_object) };
}

#[inline(always)]
fn create_scan_work(&self, nodes: Vec<ObjectReference>, roots: bool) -> ScanObjects<Self> {
ScanObjects::<Self>::new(nodes, false, roots)
}
}

impl<VM: VMBinding> Deref for GenNurseryProcessEdges<VM> {
Expand Down
Loading

0 comments on commit 57716df

Please sign in to comment.