Skip to content

Commit

Permalink
Rename to create_process_roots_work
Browse files Browse the repository at this point in the history
  • Loading branch information
wks committed May 21, 2024
1 parent 88e1826 commit b3850b8
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
42 changes: 21 additions & 21 deletions mmtk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"]
# - change branch/rev
# - change repo name
# But other changes including adding/removing whitespaces in commented lines may break the CI.
mmtk = { git = "https://github.com/wks/mmtk-core.git", rev = "0e0ef693ab3b3727eb65ab7d4f4d6f30eef9ef5d" }
mmtk = { git = "https://github.com/wks/mmtk-core.git", rev = "cf57f5e3d3b3cfa96b04cde42b3a68e5e8e69468" }
# Uncomment the following to build locally - if you change the path locally, do not commit the change in a PR
# mmtk = { path = "../repos/mmtk-core" }

Expand Down
4 changes: 2 additions & 2 deletions mmtk/src/scan_boot_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ pub fn scan_boot_image(
if slots.len() >= SLOTS_BUFFER_CAPACITY {
let new_slots =
mem::replace(&mut slots, Vec::with_capacity(SLOTS_BUFFER_CAPACITY));
factory.create_process_root_slots_work(new_slots);
factory.create_process_roots_work(new_slots);
}
});
trace!("Chunk processed successfully");
cursor += stride;
}
if !slots.is_empty() {
factory.create_process_root_slots_work(slots);
factory.create_process_roots_work(slots);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions mmtk/src/scan_statics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ pub fn scan_statics(
// TODO: check_reference?
slot_list.push(slots + slot_offset);
if slot_list.len() >= SLOTS_BUFFER_CAPACITY {
factory.create_process_root_slots_work(slot_list);
factory.create_process_roots_work(slot_list);
slot_list = Vec::with_capacity(SLOTS_BUFFER_CAPACITY);
}
// trace.process_root_edge(slots + slot_offset, true);
slot += REF_SLOT_SIZE;
}
if !slot_list.is_empty() {
factory.create_process_root_slots_work(slot_list);
factory.create_process_roots_work(slot_list);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions mmtk/src/scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extern "C" fn report_slots_and_renew_buffer<F: RootsWorkFactory<JikesRVMSlot>>(
if !ptr.is_null() {
let buf = unsafe { Vec::<Address>::from_raw_parts(ptr, length, SLOTS_BUFFER_CAPACITY) };
let factory: &mut F = unsafe { &mut *factory };
factory.create_process_root_slots_work(buf);
factory.create_process_roots_work(buf);
}
let (ptr, _, capacity) = {
// TODO: Use Vec::into_raw_parts() when the method is available.
Expand Down Expand Up @@ -365,11 +365,11 @@ impl<F: RootsWorkFactory<JikesRVMSlot>> GCWork<JikesRVM> for ScanGlobalRoots<F>
slots.push(slot);
if slots.len() >= SLOTS_BUFFER_CAPACITY {
let new_slots = mem::replace(&mut slots, Vec::with_capacity(SLOTS_BUFFER_CAPACITY));
self.factory.create_process_root_slots_work(new_slots);
self.factory.create_process_roots_work(new_slots);
}
});
if !slots.is_empty() {
self.factory.create_process_root_slots_work(slots);
self.factory.create_process_roots_work(slots);
}
}
}

0 comments on commit b3850b8

Please sign in to comment.