From 2cf2ff7e9db8adab8239becc72c796168c627f81 Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Tue, 15 Aug 2023 01:59:29 +0000 Subject: [PATCH 1/2] Add features for genimmix and stickyimmix --- mmtk/Cargo.toml | 2 ++ mmtk/src/api.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 196f5369..99244cd3 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -62,3 +62,5 @@ gencopy = [] marksweep = [] pageprotect = [] immix = [] +genimmix = [] +stickyimmix = [] diff --git a/mmtk/src/api.rs b/mmtk/src/api.rs index 402eea3a..9b1f3eca 100644 --- a/mmtk/src/api.rs +++ b/mmtk/src/api.rs @@ -72,6 +72,10 @@ pub extern "C" fn openjdk_gc_init(calls: *const OpenJDK_Upcalls) { Some(PlanSelector::PageProtect) } else if cfg!(feature = "immix") { Some(PlanSelector::Immix) + } else if cfg!(feature = "genimmix") { + Some(PlanSelector::GenImmix) + } else if cfg!(feature = "stickyimmix") { + Some(PlanSelector::StickyImmix) } else { None }; From 102bd1544247af50e665bde662adafb2bd518508 Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Tue, 15 Aug 2023 02:20:21 +0000 Subject: [PATCH 2/2] Fix style check --- mmtk/src/api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/src/api.rs b/mmtk/src/api.rs index 9b1f3eca..25fb34af 100644 --- a/mmtk/src/api.rs +++ b/mmtk/src/api.rs @@ -72,7 +72,7 @@ pub extern "C" fn openjdk_gc_init(calls: *const OpenJDK_Upcalls) { Some(PlanSelector::PageProtect) } else if cfg!(feature = "immix") { Some(PlanSelector::Immix) - } else if cfg!(feature = "genimmix") { + } else if cfg!(feature = "genimmix") { Some(PlanSelector::GenImmix) } else if cfg!(feature = "stickyimmix") { Some(PlanSelector::StickyImmix)