diff --git a/mmtk/Cargo.lock b/mmtk/Cargo.lock index aad3f357..2d244423 100644 --- a/mmtk/Cargo.lock +++ b/mmtk/Cargo.lock @@ -438,7 +438,7 @@ dependencies = [ [[package]] name = "mmtk" version = "0.30.0" -source = "git+https://github.com/mmtk/mmtk-core.git?rev=c0f97884234b51b13c8ba5d1563a8e0f592d11c2#c0f97884234b51b13c8ba5d1563a8e0f592d11c2" +source = "git+https://github.com/mmtk/mmtk-core.git?rev=ec745353a8de72b645613e0fef3ab7f5f1ad9bd1#ec745353a8de72b645613e0fef3ab7f5f1ad9bd1" dependencies = [ "atomic", "atomic-traits", @@ -474,7 +474,7 @@ dependencies = [ [[package]] name = "mmtk-macros" version = "0.30.0" -source = "git+https://github.com/mmtk/mmtk-core.git?rev=c0f97884234b51b13c8ba5d1563a8e0f592d11c2#c0f97884234b51b13c8ba5d1563a8e0f592d11c2" +source = "git+https://github.com/mmtk/mmtk-core.git?rev=ec745353a8de72b645613e0fef3ab7f5f1ad9bd1#ec745353a8de72b645613e0fef3ab7f5f1ad9bd1" dependencies = [ "proc-macro-error", "proc-macro2", diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index c3808816..aaba99ed 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -35,7 +35,7 @@ probe = "0.5" # - change branch # - change repo name # But other changes including adding/removing whitespaces in commented lines may break the CI. -mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "c0f97884234b51b13c8ba5d1563a8e0f592d11c2" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "ec745353a8de72b645613e0fef3ab7f5f1ad9bd1" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } @@ -72,3 +72,4 @@ pageprotect = [] immix = [] genimmix = [] stickyimmix = [] +markcompact = [] diff --git a/mmtk/rust-toolchain b/mmtk/rust-toolchain index 79e15fd4..6b4de0a4 100644 --- a/mmtk/rust-toolchain +++ b/mmtk/rust-toolchain @@ -1 +1 @@ -1.77.0 +1.83.0 diff --git a/mmtk/src/abi.rs b/mmtk/src/abi.rs index 1ff7bef9..c950f305 100644 --- a/mmtk/src/abi.rs +++ b/mmtk/src/abi.rs @@ -329,7 +329,9 @@ impl OopDesc { impl fmt::Debug for OopDesc { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let c_string = unsafe { ((*UPCALLS).dump_object_string)(mem::transmute(self)) }; + let c_string = unsafe { + ((*UPCALLS).dump_object_string)(mem::transmute::<&OopDesc, ObjectReference>(self)) + }; let c_str: &CStr = unsafe { CStr::from_ptr(c_string) }; let s: &str = c_str.to_str().unwrap(); write!(f, "{}", s) diff --git a/mmtk/src/active_plan.rs b/mmtk/src/active_plan.rs index 72022ffc..1406ef5d 100644 --- a/mmtk/src/active_plan.rs +++ b/mmtk/src/active_plan.rs @@ -12,7 +12,7 @@ struct OpenJDKMutatorIterator<'a, const COMPRESSED: bool> { phantom_data: PhantomData<&'a ()>, } -impl<'a, const COMPRESSED: bool> OpenJDKMutatorIterator<'a, COMPRESSED> { +impl OpenJDKMutatorIterator<'_, COMPRESSED> { fn new() -> Self { let mut mutators = VecDeque::new(); unsafe { diff --git a/mmtk/src/api.rs b/mmtk/src/api.rs index 4e619e2b..19c59580 100644 --- a/mmtk/src/api.rs +++ b/mmtk/src/api.rs @@ -235,12 +235,6 @@ pub extern "C" fn total_bytes() -> usize { with_singleton!(|singleton| memory_manager::total_bytes(singleton)) } -#[no_mangle] -#[cfg(feature = "sanity")] -pub extern "C" fn scan_region() { - with_singleton!(|singleton| memory_manager::scan_region(singleton)) -} - #[no_mangle] pub extern "C" fn handle_user_collection_request(tls: VMMutatorThread) { with_singleton!(|singleton| { diff --git a/mmtk/src/object_scanning.rs b/mmtk/src/object_scanning.rs index 56dbda6c..c3143c8b 100644 --- a/mmtk/src/object_scanning.rs +++ b/mmtk/src/object_scanning.rs @@ -170,10 +170,10 @@ fn oop_iterate_slow>>( unsafe { CLOSURE.with(|x| *x.get() = closure as *mut V as *mut u8); ((*UPCALLS).scan_object)( - mem::transmute( + mem::transmute::<*const unsafe extern "C" fn(Address), *mut libc::c_void>( scan_object_fn:: as *const unsafe extern "C" fn(slot: Address), ), - mem::transmute(oop), + mem::transmute::<&OopDesc, ObjectReference>(oop), tls, ); } @@ -235,5 +235,7 @@ pub fn scan_object( closure: &mut impl SlotVisitor>, _tls: VMWorkerThread, ) { - unsafe { oop_iterate::(mem::transmute(object), closure) } + unsafe { + oop_iterate::(mem::transmute::(object), closure) + } }