From 5905662df0e070122355148cbd810bed85a39712 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Mon, 22 Feb 2021 22:11:54 +1100 Subject: [PATCH 01/28] Add immix allocator --- openjdk/mmtk.h | 1 + openjdk/mmtkBarrierSetAssembler_x86.cpp | 2 +- openjdk/mmtkBarrierSetC2.cpp | 2 +- openjdk/mmtkMutator.hpp | 21 +++++++++++++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/openjdk/mmtk.h b/openjdk/mmtk.h index 047ae650..3279d08d 100644 --- a/openjdk/mmtk.h +++ b/openjdk/mmtk.h @@ -48,6 +48,7 @@ struct AllocatorSelector { }; #define TAG_BUMP_POINTER 0 #define TAG_LARGE_OBJECT 1 +#define TAG_IMMIX 2 extern AllocatorSelector get_allocator_mapping(int allocator); diff --git a/openjdk/mmtkBarrierSetAssembler_x86.cpp b/openjdk/mmtkBarrierSetAssembler_x86.cpp index ace63230..3494b0a0 100644 --- a/openjdk/mmtkBarrierSetAssembler_x86.cpp +++ b/openjdk/mmtkBarrierSetAssembler_x86.cpp @@ -45,7 +45,7 @@ void MMTkBarrierSetAssembler::eden_allocate(MacroAssembler* masm, Register threa AllocatorSelector selector = get_allocator_mapping(AllocatorDefault); // Only bump pointer allocator is implemented. - if (selector.tag != TAG_BUMP_POINTER) { + if (selector.tag != TAG_BUMP_POINTER && selector.tag != TAG_IMMIX) { fatal("unimplemented allocator fastpath\n"); } diff --git a/openjdk/mmtkBarrierSetC2.cpp b/openjdk/mmtkBarrierSetC2.cpp index 1eb76d02..847097f9 100644 --- a/openjdk/mmtkBarrierSetC2.cpp +++ b/openjdk/mmtkBarrierSetC2.cpp @@ -125,7 +125,7 @@ void MMTkBarrierSetC2::expand_allocate( AllocatorSelector selector = get_allocator_mapping(AllocatorDefault); // Only bump pointer allocator is implemented. - if (selector.tag != TAG_BUMP_POINTER) { + if (selector.tag != TAG_BUMP_POINTER && selector.tag != TAG_IMMIX) { fatal("unimplemented allocator fastpath\n"); } diff --git a/openjdk/mmtkMutator.hpp b/openjdk/mmtkMutator.hpp index ac957247..7e812f68 100644 --- a/openjdk/mmtkMutator.hpp +++ b/openjdk/mmtkMutator.hpp @@ -21,6 +21,7 @@ struct RustDynPtr { // These constants should match the constants defind in mmtk::util::alloc::allocators const int MAX_BUMP_ALLOCATORS = 5; const int MAX_LARGE_OBJECT_ALLOCATORS = 1; +const int MAX_IMMIX_ALLOCATORS = 1; // The following types should have the same layout as the types with the same name in MMTk core (Rust) @@ -38,9 +39,29 @@ struct LargeObjectAllocator { RustDynPtr plan; }; +struct ImmixAllocator { + void* tls; + void* cursor; + void* limit; + RustDynPtr space; + RustDynPtr plan; + uint8_t hot; + uint8_t copy; + void* large_cursor; + void* large_limit; + uint8_t request_for_large; + uint8_t straddle; + uint32_t line_use_count; + void* mark_table; + void* recyclable_block; + uint32_t line; + uint8_t recyclable_exhausted; +}; + struct Allocators { BumpAllocator bump_pointer[MAX_BUMP_ALLOCATORS]; LargeObjectAllocator large_object[MAX_LARGE_OBJECT_ALLOCATORS]; + ImmixAllocator immix[MAX_IMMIX_ALLOCATORS]; }; struct MutatorConfig { From 9cc7b2a349572eb594b3fd56c8025c117c33fd62 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Sun, 28 Feb 2021 13:07:06 +1100 Subject: [PATCH 02/28] Reuse lines --- openjdk/mmtkMutator.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openjdk/mmtkMutator.hpp b/openjdk/mmtkMutator.hpp index 7e812f68..f20cbbc2 100644 --- a/openjdk/mmtkMutator.hpp +++ b/openjdk/mmtkMutator.hpp @@ -51,10 +51,11 @@ struct ImmixAllocator { void* large_limit; uint8_t request_for_large; uint8_t straddle; - uint32_t line_use_count; + uintptr_t line_use_count; void* mark_table; + uint8_t recyclable_block_tag; void* recyclable_block; - uint32_t line; + uintptr_t line; uint8_t recyclable_exhausted; }; From 0a1a8a4ee03851949807e197b4efb62d0320589e Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Sun, 28 Feb 2021 13:22:55 +1100 Subject: [PATCH 03/28] Refactor --- openjdk/mmtkMutator.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openjdk/mmtkMutator.hpp b/openjdk/mmtkMutator.hpp index f20cbbc2..c9d6cb13 100644 --- a/openjdk/mmtkMutator.hpp +++ b/openjdk/mmtkMutator.hpp @@ -53,9 +53,10 @@ struct ImmixAllocator { uint8_t straddle; uintptr_t line_use_count; void* mark_table; - uint8_t recyclable_block_tag; - void* recyclable_block; - uintptr_t line; + uint8_t recyclable_block_opt_tag; + void* recyclable_block_opt; + uint8_t line_opt_tag; + uintptr_t line_opt; uint8_t recyclable_exhausted; }; From 95b62365dbdc206c7f4f2b4f71968e1767ef5da9 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Sun, 28 Feb 2021 14:05:41 +1100 Subject: [PATCH 04/28] Fix allocation fastpath --- openjdk/mmtkBarrierSetAssembler_x86.cpp | 25 +++++++++++++------ openjdk/mmtkBarrierSetC2.cpp | 33 +++++++++++++++++-------- 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/openjdk/mmtkBarrierSetAssembler_x86.cpp b/openjdk/mmtkBarrierSetAssembler_x86.cpp index 3494b0a0..e7180b77 100644 --- a/openjdk/mmtkBarrierSetAssembler_x86.cpp +++ b/openjdk/mmtkBarrierSetAssembler_x86.cpp @@ -48,15 +48,26 @@ void MMTkBarrierSetAssembler::eden_allocate(MacroAssembler* masm, Register threa if (selector.tag != TAG_BUMP_POINTER && selector.tag != TAG_IMMIX) { fatal("unimplemented allocator fastpath\n"); } - + // Calculat offsets of top and end. We now assume we are using bump pointer. - int allocator_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) - + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)) - + in_bytes(byte_offset_of(Allocators, bump_pointer)) - + selector.index * sizeof(BumpAllocator); + int allocator_base_offset; + Address cursor, limit; - Address cursor = Address(r15_thread, allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, cursor))); - Address limit = Address(r15_thread, allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, limit))); + if (selector.tag == TAG_IMMIX) { + allocator_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) + + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)) + + in_bytes(byte_offset_of(Allocators, immix)) + + selector.index * sizeof(ImmixAllocator); + cursor = Address(r15_thread, allocator_base_offset + in_bytes(byte_offset_of(ImmixAllocator, cursor))); + limit = Address(r15_thread, allocator_base_offset + in_bytes(byte_offset_of(ImmixAllocator, limit))); + } else { + allocator_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) + + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)) + + in_bytes(byte_offset_of(Allocators, bump_pointer)) + + selector.index * sizeof(BumpAllocator); + cursor = Address(r15_thread, allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, cursor))); + limit = Address(r15_thread, allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, limit))); + } // obj = load lab.cursor __ movptr(obj, cursor); // end = obj + size diff --git a/openjdk/mmtkBarrierSetC2.cpp b/openjdk/mmtkBarrierSetC2.cpp index 847097f9..ac60b0fb 100644 --- a/openjdk/mmtkBarrierSetC2.cpp +++ b/openjdk/mmtkBarrierSetC2.cpp @@ -130,16 +130,29 @@ void MMTkBarrierSetC2::expand_allocate( } // Calculat offsets of top and end. We now assume we are using bump pointer. - int allocator_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) - + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)) - + in_bytes(byte_offset_of(Allocators, bump_pointer)) - + selector.index * sizeof(BumpAllocator); - - Node* thread = x->transform_later(new ThreadLocalNode()); - int tlab_top_offset = allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, cursor)); - int tlab_end_offset = allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, limit)); - eden_top_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_top_offset); - eden_end_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_end_offset); + if (selector.tag == TAG_IMMIX) { + int allocator_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) + + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)) + + in_bytes(byte_offset_of(Allocators, immix)) + + selector.index * sizeof(ImmixAllocator); + + Node* thread = x->transform_later(new ThreadLocalNode()); + int tlab_top_offset = allocator_base_offset + in_bytes(byte_offset_of(ImmixAllocator, cursor)); + int tlab_end_offset = allocator_base_offset + in_bytes(byte_offset_of(ImmixAllocator, limit)); + eden_top_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_top_offset); + eden_end_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_end_offset); + } else { + int allocator_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) + + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)) + + in_bytes(byte_offset_of(Allocators, bump_pointer)) + + selector.index * sizeof(BumpAllocator); + + Node* thread = x->transform_later(new ThreadLocalNode()); + int tlab_top_offset = allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, cursor)); + int tlab_end_offset = allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, limit)); + eden_top_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_top_offset); + eden_end_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_end_offset); + } } // set_eden_pointers(eden_top_adr, eden_end_adr); From 577b4ebb208c2868f542ae4c058d5085910ab0b7 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Mon, 1 Mar 2021 10:44:50 +1100 Subject: [PATCH 05/28] update mmtk-core --- mmtk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 8f9aec23..14f58272 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -21,7 +21,7 @@ lazy_static = "1.1" # - change branch # - change repo name # But other changes including adding/removing whitespaces in commented lines may break the CI. -mmtk = { git = "ssh://git@github.com/mmtk/mmtk-core.git", rev = "1c7d7abb8e2adc5a9f64326af2f5af6a5d335497" } +mmtk = { git = "ssh://git@github.com/mmtk/mmtk-core.git", rev = "bd75773a498f78330499899fac6484b223aecb92" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } From b6e9d49e0fab10a265ea2a2db99fd108b7735c37 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Mon, 1 Mar 2021 11:12:42 +1100 Subject: [PATCH 06/28] Update mmtk-core --- mmtk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 14f58272..05698e24 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -21,7 +21,7 @@ lazy_static = "1.1" # - change branch # - change repo name # But other changes including adding/removing whitespaces in commented lines may break the CI. -mmtk = { git = "ssh://git@github.com/mmtk/mmtk-core.git", rev = "bd75773a498f78330499899fac6484b223aecb92" } +mmtk = { git = "ssh://git@github.com/mmtk/mmtk-core.git", rev = "9cc0376156e4dc5ea748649eb962239422bb9c46" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } From 552368eca461b38f02d3e1bf671b2036f30d342a Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Wed, 10 Mar 2021 10:38:50 +1100 Subject: [PATCH 07/28] inline hot methods --- mmtk/src/object_model.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mmtk/src/object_model.rs b/mmtk/src/object_model.rs index 099edbd4..fecd0322 100644 --- a/mmtk/src/object_model.rs +++ b/mmtk/src/object_model.rs @@ -52,10 +52,12 @@ impl ObjectModel for VMObjectModel { unimplemented!() } + #[inline(always)] fn object_start_ref(object: ObjectReference) -> Address { object.to_address() } + #[inline(always)] fn ref_to_address(object: ObjectReference) -> Address { object.to_address() } From 7f9d18275d4dc4b8a8641b647c4fd8be3517237a Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Thu, 25 Mar 2021 18:55:27 +1100 Subject: [PATCH 08/28] Update --- openjdk/mmtkMutator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openjdk/mmtkMutator.hpp b/openjdk/mmtkMutator.hpp index c9d6cb13..321d46ca 100644 --- a/openjdk/mmtkMutator.hpp +++ b/openjdk/mmtkMutator.hpp @@ -43,7 +43,7 @@ struct ImmixAllocator { void* tls; void* cursor; void* limit; - RustDynPtr space; + void* immix_space; RustDynPtr plan; uint8_t hot; uint8_t copy; From 2336b1dfa7c4e2ffb59cdd14086e9f1f71b75b1e Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Sun, 28 Mar 2021 12:14:58 +1100 Subject: [PATCH 09/28] Update --- mmtk/src/api.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mmtk/src/api.rs b/mmtk/src/api.rs index b292c583..5f2ca80a 100644 --- a/mmtk/src/api.rs +++ b/mmtk/src/api.rs @@ -1,5 +1,5 @@ use libc::{c_char, c_void}; -use mmtk::memory_manager; +use mmtk::{memory_manager, policy::immix::block::Block}; use mmtk::scheduler::GCWorker; use mmtk::util::alloc::allocators::AllocatorSelector; use mmtk::util::alloc::is_alloced_by_malloc; @@ -78,7 +78,13 @@ pub extern "C" fn alloc( offset: isize, allocator: AllocationSemantics, ) -> Address { - memory_manager::alloc::(unsafe { &mut *mutator }, size, align, offset, allocator) + if size > Block::BYTES { + let address = memory_manager::alloc::(unsafe { &mut *mutator }, size, align, offset, AllocationSemantics::Los); + memory_manager::post_alloc::(unsafe { &mut *mutator }, unsafe { address.to_object_reference() }, size, AllocationSemantics::Los); + address + } else { + memory_manager::alloc::(unsafe { &mut *mutator }, size, align, offset, allocator) + } } #[no_mangle] From e6c557071af3c91d26319d4663f634dca8c8d11f Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Tue, 11 May 2021 11:06:03 +1000 Subject: [PATCH 10/28] Move post_alloc to rust --- mmtk/src/api.rs | 14 +++++++------- openjdk/CompileThirdPartyHeap.gmk | 4 ---- openjdk/mmtkMutator.cpp | 3 --- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/mmtk/src/api.rs b/mmtk/src/api.rs index 5f2ca80a..efa2bfae 100644 --- a/mmtk/src/api.rs +++ b/mmtk/src/api.rs @@ -78,13 +78,13 @@ pub extern "C" fn alloc( offset: isize, allocator: AllocationSemantics, ) -> Address { - if size > Block::BYTES { - let address = memory_manager::alloc::(unsafe { &mut *mutator }, size, align, offset, AllocationSemantics::Los); - memory_manager::post_alloc::(unsafe { &mut *mutator }, unsafe { address.to_object_reference() }, size, AllocationSemantics::Los); - address - } else { - memory_manager::alloc::(unsafe { &mut *mutator }, size, align, offset, allocator) - } + let mutator = unsafe { &mut *mutator }; + let allocator = mutator.check_allocator(size, align, allocator); + let address = memory_manager::alloc::(mutator, size, align, offset, allocator); + // Post allococation. Currently we are only calling post_alloc in slowpath here. + // TODO: We also need to call them in the fastpath. + post_alloc(mutator, unsafe { address.to_object_reference() }, size, allocator); + address } #[no_mangle] diff --git a/openjdk/CompileThirdPartyHeap.gmk b/openjdk/CompileThirdPartyHeap.gmk index f6cdbde8..a310dbd7 100644 --- a/openjdk/CompileThirdPartyHeap.gmk +++ b/openjdk/CompileThirdPartyHeap.gmk @@ -2,10 +2,6 @@ MMTK_RUST_ROOT = $(TOPDIR)/../../mmtk MMTK_CPP_ROOT = $(TOPDIR)/../../openjdk -ifdef MMTK_PLAN - GC_FEATURES=--features $(MMTK_PLAN) -endif - LIB_MMTK := $(JVM_LIB_OUTPUTDIR)/libmmtk_openjdk.so ifeq ($(DEBUG_LEVEL), release) diff --git a/openjdk/mmtkMutator.cpp b/openjdk/mmtkMutator.cpp index b2fedaec..05c799ff 100644 --- a/openjdk/mmtkMutator.cpp +++ b/openjdk/mmtkMutator.cpp @@ -9,9 +9,6 @@ MMTkMutatorContext MMTkMutatorContext::bind(::Thread* current) { HeapWord* MMTkMutatorContext::alloc(size_t bytes, Allocator allocator) { // FIXME: Proper use of slow-path api HeapWord* o = (HeapWord*) ::alloc((MMTk_Mutator) this, bytes, HeapWordSize, 0, allocator); - // Post allococation. Currently we are only calling post_alloc in slowpath here. - // TODO: We also need to call them in the fastpath. - ::post_alloc((MMTk_Mutator) this, o, bytes, allocator); return o; } From 549a09911cc0912a4ad8156a6c4caedecfc0a9ec Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Thu, 13 May 2021 13:17:47 +1000 Subject: [PATCH 11/28] Cleanup --- mmtk/src/api.rs | 2 +- mmtk/src/object_model.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mmtk/src/api.rs b/mmtk/src/api.rs index 41d9196c..852619d3 100644 --- a/mmtk/src/api.rs +++ b/mmtk/src/api.rs @@ -3,7 +3,7 @@ use crate::OpenJDK_Upcalls; use crate::SINGLETON; use crate::UPCALLS; use libc::{c_char, c_void}; -use mmtk::{memory_manager, policy::immix::block::Block}; +use mmtk::memory_manager; use mmtk::plan::barriers::BarrierSelector; use mmtk::scheduler::GCWorker; use mmtk::util::alloc::allocators::AllocatorSelector; diff --git a/mmtk/src/object_model.rs b/mmtk/src/object_model.rs index 95e4b861..428b7a4f 100644 --- a/mmtk/src/object_model.rs +++ b/mmtk/src/object_model.rs @@ -48,12 +48,10 @@ impl ObjectModel for VMObjectModel { unimplemented!() } - #[inline(always)] fn object_start_ref(object: ObjectReference) -> Address { object.to_address() } - #[inline(always)] fn ref_to_address(object: ObjectReference) -> Address { object.to_address() } From 15d961ea2024dda312e4436ad1db9a9c5032c7b9 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Wed, 26 May 2021 10:36:15 +1000 Subject: [PATCH 12/28] Fix --- mmtk/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/mmtk/src/lib.rs b/mmtk/src/lib.rs index 6124b0ea..d3ce5f05 100644 --- a/mmtk/src/lib.rs +++ b/mmtk/src/lib.rs @@ -1,7 +1,6 @@ // specialization is considered as an incomplete feature. #![allow(incomplete_features)] #![feature(specialization)] -#![feature(const_fn)] #![feature(box_syntax)] #![feature(vec_into_raw_parts)] #![feature(once_cell)] From 877e884051b42ffd7be471466df4f84cd9ea941f Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Mon, 28 Jun 2021 15:04:36 +1000 Subject: [PATCH 13/28] Update mmtk-core --- mmtk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index e0b1d7b3..98071865 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "a8499062f9df749a6cf7acf1e626d642913206bb" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "0a4e5cd6fd81688c44c1f2e189da8e53c4075acd" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } From e1bcc9299b9e0a8736de7e076253801e385e85e2 Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Fri, 9 Jul 2021 12:09:46 +1000 Subject: [PATCH 14/28] Update mmtk-core --- mmtk/Cargo.toml | 2 +- mmtk/src/vm_metadata/constants.rs | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 1737fb5c..d6eb5aec 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "1e7964656eb0988e3fa4f216c5f8dfb1dba7b31f" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "76c2fa091f18f842680c32a6140c19b1cbe02d4d" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } diff --git a/mmtk/src/vm_metadata/constants.rs b/mmtk/src/vm_metadata/constants.rs index e24a199a..902cc13a 100644 --- a/mmtk/src/vm_metadata/constants.rs +++ b/mmtk/src/vm_metadata/constants.rs @@ -1,6 +1,3 @@ -use mmtk::util::metadata::side_metadata::{ - GLOBAL_SIDE_METADATA_VM_BASE_ADDRESS, LOCAL_SIDE_METADATA_VM_BASE_ADDRESS, -}; use mmtk::vm::*; #[cfg(target_pointer_width = "64")] @@ -15,7 +12,7 @@ pub(crate) const FORWARDING_POINTER_OFFSET: isize = 0; /// Global logging bit metadata spec /// 1 bit per object pub(crate) const LOGGING_SIDE_METADATA_SPEC: VMGlobalLogBitSpec = - VMGlobalLogBitSpec::side(GLOBAL_SIDE_METADATA_VM_BASE_ADDRESS.as_usize()); + VMGlobalLogBitSpec::side_first(); // Global MetadataSpecs - End @@ -39,10 +36,6 @@ pub(crate) const MARKING_METADATA_SPEC: VMLocalMarkBitSpec = /// PolicySpecific mark-and-nursery bits metadata spec /// 2-bits per object pub(crate) const LOS_METADATA_SPEC: VMLocalLOSMarkNurserySpec = - VMLocalLOSMarkNurserySpec::side(if cfg!(target_pointer_width = "64") { - LOCAL_SIDE_METADATA_VM_BASE_ADDRESS.as_usize() - } else { - 0 - }); + VMLocalLOSMarkNurserySpec::side_first(); // PolicySpecific MetadataSpecs - End From 8290738025a992503c41f7ede228d534b7ffacdd Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Fri, 9 Jul 2021 14:42:37 +1000 Subject: [PATCH 15/28] cargo fmt --- mmtk/src/vm_metadata/constants.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mmtk/src/vm_metadata/constants.rs b/mmtk/src/vm_metadata/constants.rs index 902cc13a..61ee794d 100644 --- a/mmtk/src/vm_metadata/constants.rs +++ b/mmtk/src/vm_metadata/constants.rs @@ -11,8 +11,7 @@ pub(crate) const FORWARDING_POINTER_OFFSET: isize = 0; /// Global logging bit metadata spec /// 1 bit per object -pub(crate) const LOGGING_SIDE_METADATA_SPEC: VMGlobalLogBitSpec = - VMGlobalLogBitSpec::side_first(); +pub(crate) const LOGGING_SIDE_METADATA_SPEC: VMGlobalLogBitSpec = VMGlobalLogBitSpec::side_first(); // Global MetadataSpecs - End From ba8ee0624b2ad6adf238c329e98cd309d51bad29 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Fri, 16 Jul 2021 11:15:48 +1000 Subject: [PATCH 16/28] Fix after rebase --- mmtk/src/api.rs | 8 +------- openjdk/mmtkMutator.cpp | 3 +++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/mmtk/src/api.rs b/mmtk/src/api.rs index e5eabe71..8ac51d64 100644 --- a/mmtk/src/api.rs +++ b/mmtk/src/api.rs @@ -83,13 +83,7 @@ pub extern "C" fn alloc( offset: isize, allocator: AllocationSemantics, ) -> Address { - let mutator = unsafe { &mut *mutator }; - let allocator = mutator.check_allocator(size, align, allocator); - let address = memory_manager::alloc::(mutator, size, align, offset, allocator); - // Post allococation. Currently we are only calling post_alloc in slowpath here. - // TODO: We also need to call them in the fastpath. - post_alloc(mutator, unsafe { address.to_object_reference() }, size, allocator); - address + memory_manager::alloc::(unsafe { &mut *mutator }, size, align, offset, allocator) } #[no_mangle] diff --git a/openjdk/mmtkMutator.cpp b/openjdk/mmtkMutator.cpp index 3fc15160..9997322a 100644 --- a/openjdk/mmtkMutator.cpp +++ b/openjdk/mmtkMutator.cpp @@ -18,6 +18,9 @@ HeapWord* MMTkMutatorContext::alloc(size_t bytes, Allocator allocator) { // FIXME: Proper use of slow-path api HeapWord* o = (HeapWord*) ::alloc((MMTk_Mutator) this, bytes, HeapWordSize, 0, allocator); + // Post allococation. Currently we are only calling post_alloc in slowpath here. + // TODO: We also need to call them in the fastpath. + ::post_alloc((MMTk_Mutator) this, o, bytes, allocator); return o; } From 41c8b45f5d204221b8a8e966bf50bd09dbe9cfc5 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Fri, 16 Jul 2021 12:39:11 +1000 Subject: [PATCH 17/28] extract common code --- openjdk/mmtkBarrierSetC2.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/openjdk/mmtkBarrierSetC2.cpp b/openjdk/mmtkBarrierSetC2.cpp index e0204f1d..d5418864 100644 --- a/openjdk/mmtkBarrierSetC2.cpp +++ b/openjdk/mmtkBarrierSetC2.cpp @@ -182,29 +182,25 @@ void MMTkBarrierSetC2::expand_allocate( } // Calculat offsets of top and end. We now assume we are using bump pointer. + int allocators_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) + + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)); + int tlab_top_offset, tlab_end_offset; if (selector.tag == TAG_IMMIX) { - int allocator_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) - + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)) + int allocator_base_offset = allocators_base_offset + in_bytes(byte_offset_of(Allocators, immix)) + selector.index * sizeof(ImmixAllocator); - - Node* thread = x->transform_later(new ThreadLocalNode()); - int tlab_top_offset = allocator_base_offset + in_bytes(byte_offset_of(ImmixAllocator, cursor)); - int tlab_end_offset = allocator_base_offset + in_bytes(byte_offset_of(ImmixAllocator, limit)); - eden_top_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_top_offset); - eden_end_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_end_offset); + tlab_top_offset = allocator_base_offset + in_bytes(byte_offset_of(ImmixAllocator, cursor)); + tlab_end_offset = allocator_base_offset + in_bytes(byte_offset_of(ImmixAllocator, limit)); } else { - int allocator_base_offset = in_bytes(JavaThread::third_party_heap_mutator_offset()) - + in_bytes(byte_offset_of(MMTkMutatorContext, allocators)) + int allocator_base_offset = allocators_base_offset + in_bytes(byte_offset_of(Allocators, bump_pointer)) + selector.index * sizeof(BumpAllocator); - - Node* thread = x->transform_later(new ThreadLocalNode()); - int tlab_top_offset = allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, cursor)); - int tlab_end_offset = allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, limit)); - eden_top_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_top_offset); - eden_end_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_end_offset); + tlab_top_offset = allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, cursor)); + tlab_end_offset = allocator_base_offset + in_bytes(byte_offset_of(BumpAllocator, limit)); } + Node* thread = x->transform_later(new ThreadLocalNode()); + eden_top_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_top_offset); + eden_end_adr = x->basic_plus_adr(x->top()/*not oop*/, thread, tlab_end_offset); } // set_eden_pointers(eden_top_adr, eden_end_adr); From bfa0e904e804aeafbe1e9bf1e77365a06bf1deb0 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Fri, 16 Jul 2021 12:41:09 +1000 Subject: [PATCH 18/28] Update mmtk --- mmtk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 0a120c33..07b2ecb2 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "0875c9084fc11114f122f4f4d59d27f2ceeae07b" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "d8e120b191e3ca7a473a08eeefa9d6050ffc8a35" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } From c57950172ee813268e05d4cd45e981fc2a6ed395 Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Wed, 21 Jul 2021 14:35:02 +1000 Subject: [PATCH 19/28] Revert changes for makr bit in_header() --- mmtk/src/vm_metadata/constants.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/src/vm_metadata/constants.rs b/mmtk/src/vm_metadata/constants.rs index 18e13648..12c5742a 100644 --- a/mmtk/src/vm_metadata/constants.rs +++ b/mmtk/src/vm_metadata/constants.rs @@ -31,7 +31,7 @@ pub(crate) const FORWARDING_BITS_METADATA_SPEC: VMLocalForwardingBitsSpec = /// 1 bit per object #[cfg(feature = "mark_bit_in_header")] pub(crate) const MARKING_METADATA_SPEC: VMLocalMarkBitSpec = - VMLocalMarkBitSpec::in_header(); + VMLocalMarkBitSpec::in_header(FORWARDING_BITS_OFFSET); #[cfg(not(feature = "mark_bit_in_header"))] pub(crate) const MARKING_METADATA_SPEC: VMLocalMarkBitSpec = From 1c719316ae011576359ec9eff61a3e0e8f64522c Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Wed, 21 Jul 2021 16:05:39 +1000 Subject: [PATCH 20/28] Use side mark bits --- mmtk/src/vm_metadata/constants.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mmtk/src/vm_metadata/constants.rs b/mmtk/src/vm_metadata/constants.rs index e24a199a..831aebb9 100644 --- a/mmtk/src/vm_metadata/constants.rs +++ b/mmtk/src/vm_metadata/constants.rs @@ -1,3 +1,4 @@ +use mmtk::util::metadata::MetadataSpec; use mmtk::util::metadata::side_metadata::{ GLOBAL_SIDE_METADATA_VM_BASE_ADDRESS, LOCAL_SIDE_METADATA_VM_BASE_ADDRESS, }; @@ -34,7 +35,10 @@ pub(crate) const FORWARDING_BITS_METADATA_SPEC: VMLocalForwardingBitsSpec = /// PolicySpecific mark bit metadata spec /// 1 bit per object pub(crate) const MARKING_METADATA_SPEC: VMLocalMarkBitSpec = - VMLocalMarkBitSpec::in_header(FORWARDING_BITS_OFFSET); + VMLocalMarkBitSpec::side(match LOS_METADATA_SPEC.get_spec() { + MetadataSpec::OnSide(side) => side.accumulated_size(), + _ => LOCAL_SIDE_METADATA_VM_BASE_ADDRESS.as_usize() + }); /// PolicySpecific mark-and-nursery bits metadata spec /// 2-bits per object From 52fe54bf75bdda48f20b14f37689ae1d1d216bce Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Thu, 22 Jul 2021 16:16:47 +1200 Subject: [PATCH 21/28] Update Cargo.toml --- mmtk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 9aa90d67..d255ffad 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "40c0a8ea0bccd2a123c3025887e5c6820fa50ea4" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "f50ac55df1b4819a0e2a412c89038d17cfcdc666" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } From c728a06565954a8a0715715d30e53a8c910740f7 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Thu, 22 Jul 2021 14:35:36 +1000 Subject: [PATCH 22/28] Update mmtk --- mmtk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 8adaae7d..118ab277 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "d8e120b191e3ca7a473a08eeefa9d6050ffc8a35" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "7b3672d45f8fe659992ab6cc8724f27aa2e5f0fa" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } From c442877b84ca35d265e1061bcf54df82379c9677 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Fri, 23 Jul 2021 12:26:37 +1000 Subject: [PATCH 23/28] Update mmtk-core --- mmtk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 118ab277..b9d961d6 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "7b3672d45f8fe659992ab6cc8724f27aa2e5f0fa" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "b2106d2b4df0f4c62e9a7af24b3a5df20819159d" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } From a178535cfdd5045b8cbf56ab74976c6856e174d4 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Wed, 28 Jul 2021 21:14:47 +1000 Subject: [PATCH 24/28] Remove unused fields --- mmtk/Cargo.toml | 2 +- openjdk/mmtkMutator.hpp | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index b9d961d6..d2d0bd56 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "b2106d2b4df0f4c62e9a7af24b3a5df20819159d" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "2a9b8ca2c30a58c6d490e0defb1ed125d79e49e9" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } diff --git a/openjdk/mmtkMutator.hpp b/openjdk/mmtkMutator.hpp index b4afe3f7..410499e0 100644 --- a/openjdk/mmtkMutator.hpp +++ b/openjdk/mmtkMutator.hpp @@ -51,14 +51,9 @@ struct ImmixAllocator { void* large_cursor; void* large_limit; uint8_t request_for_large; - uint8_t straddle; - uintptr_t line_use_count; - void* mark_table; - uint8_t recyclable_block_opt_tag; - void* recyclable_block_opt; + uint8_t _align[7]; uint8_t line_opt_tag; uintptr_t line_opt; - uint8_t recyclable_exhausted; }; struct MallocAllocator { From ecb863e035070c947ded34ab0aa0d7b1e97e96b1 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Mon, 2 Aug 2021 09:48:50 +1000 Subject: [PATCH 25/28] Add ci tests --- .github/scripts/ci-test.sh | 18 ++++++++++++++++++ mmtk/Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/scripts/ci-test.sh b/.github/scripts/ci-test.sh index 656b4c2c..f856db55 100755 --- a/.github/scripts/ci-test.sh +++ b/.github/scripts/ci-test.sh @@ -116,3 +116,21 @@ build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHea build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms4G -Xmx4G -jar benchmarks/dacapo-2006-10-MR2.jar fop build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms4G -Xmx4G -jar benchmarks/dacapo-2006-10-MR2.jar luindex # build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms4G -Xmx4G -jar benchmarks/dacapo-2006-10-MR2.jar pmd + +# --- Immix --- +export MMTK_PLAN=Immix + +# Test - the benchmarks that are commented out do not work yet +# Note: the command line options are necessary for now to ensure the benchmarks work. We may later change the options if we do not have these many constraints. +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar antlr +#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar bloat - does not work for stock build +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar fop +#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar jython - does not work for stock build +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar luindex +#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar lusearch - validation failed +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar pmd +#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar xalan - mmtk-core gets stuck in slowdebug build + +# These benchmarks take 40s+ for slowdebug build, we may consider removing them from the CI +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar hsqldb +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar eclipse diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 85a7c26a..0c723f17 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "d4fd042975f3278534997ff1652d63c235d32f29" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "f11745df2e79a52f6e0ab7b152692da61c827e7a" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" } From e5632d76de258c2f89ade6b87be0b41ab8f8fd43 Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Tue, 3 Aug 2021 10:04:53 +1000 Subject: [PATCH 26/28] Fix MetadataSpec api --- mmtk/src/vm_metadata/constants.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mmtk/src/vm_metadata/constants.rs b/mmtk/src/vm_metadata/constants.rs index c1796205..12c5742a 100644 --- a/mmtk/src/vm_metadata/constants.rs +++ b/mmtk/src/vm_metadata/constants.rs @@ -31,10 +31,7 @@ pub(crate) const FORWARDING_BITS_METADATA_SPEC: VMLocalForwardingBitsSpec = /// 1 bit per object #[cfg(feature = "mark_bit_in_header")] pub(crate) const MARKING_METADATA_SPEC: VMLocalMarkBitSpec = - VMLocalMarkBitSpec::side(match LOS_METADATA_SPEC.get_spec() { - MetadataSpec::OnSide(side) => side.accumulated_size(), - _ => LOCAL_SIDE_METADATA_VM_BASE_ADDRESS.as_usize() - }); + VMLocalMarkBitSpec::in_header(FORWARDING_BITS_OFFSET); #[cfg(not(feature = "mark_bit_in_header"))] pub(crate) const MARKING_METADATA_SPEC: VMLocalMarkBitSpec = From 6e3da7c6c1bd88b774e22fc9162e575daafdd2ff Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Wed, 4 Aug 2021 09:51:08 +1000 Subject: [PATCH 27/28] Run immix tests before build with MARK_IN_HEADER=1 --- .github/scripts/ci-test.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/scripts/ci-test.sh b/.github/scripts/ci-test.sh index f856db55..21cae4c4 100755 --- a/.github/scripts/ci-test.sh +++ b/.github/scripts/ci-test.sh @@ -65,6 +65,24 @@ build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHea #build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms1G -Xmx1G -jar benchmarks/dacapo-2006-10-MR2.jar pmd - OOM #build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms1G -Xmx1G -jar benchmarks/dacapo-2006-10-MR2.jar xalan - OOM +# --- Immix --- +export MMTK_PLAN=Immix + +# Test - the benchmarks that are commented out do not work yet +# Note: the command line options are necessary for now to ensure the benchmarks work. We may later change the options if we do not have these many constraints. +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar antlr +#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar bloat - does not work for stock build +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar fop +#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar jython - does not work for stock build +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar luindex +#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar lusearch - validation failed +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar pmd +#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar xalan - mmtk-core gets stuck in slowdebug build + +# These benchmarks take 40s+ for slowdebug build, we may consider removing them from the CI +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar hsqldb +build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar eclipse + # --- MarkSweep --- export MMTK_PLAN=MarkSweep @@ -116,21 +134,3 @@ build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHea build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms4G -Xmx4G -jar benchmarks/dacapo-2006-10-MR2.jar fop build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms4G -Xmx4G -jar benchmarks/dacapo-2006-10-MR2.jar luindex # build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms4G -Xmx4G -jar benchmarks/dacapo-2006-10-MR2.jar pmd - -# --- Immix --- -export MMTK_PLAN=Immix - -# Test - the benchmarks that are commented out do not work yet -# Note: the command line options are necessary for now to ensure the benchmarks work. We may later change the options if we do not have these many constraints. -build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar antlr -#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar bloat - does not work for stock build -build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar fop -#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar jython - does not work for stock build -build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar luindex -#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar lusearch - validation failed -build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar pmd -#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar xalan - mmtk-core gets stuck in slowdebug build - -# These benchmarks take 40s+ for slowdebug build, we may consider removing them from the CI -build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar hsqldb -build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar benchmarks/dacapo-2006-10-MR2.jar eclipse From ab9d225d84cccda797d55ab64f105bfee74d6c6c Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Tue, 10 Aug 2021 10:45:39 +1200 Subject: [PATCH 28/28] Update Cargo.toml --- mmtk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index 47b57349..3fd768bd 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -20,7 +20,7 @@ lazy_static = "1.1" # - 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 = "6bafbab8562402db644239af1196efc163c9ee06" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "093da769a71067dcd4f37db6f453213e7dace660" } # Uncomment the following to build locally # mmtk = { path = "../repos/mmtk-core" }