Skip to content

Releases: mmtk/mmtk-core

MMTk 0.21.0

03 Nov 05:52
@wks wks
39d2371
Compare
Choose a tag to compare
MMTk 0.21.0 Pre-release
Pre-release

0.21.0 (2023-11-03)

What's Changed

Plan

  • Move some states from BasePlan to GlobalState by @qinsoon in #949
  • Extract set_collection_kind and set_gc_status by @qinsoon in #957
  • Expose is_emergency_collection to VM bindings by @wks in #997

Policy

  • Clear all side forwarding bits by @wks in #974
  • Stop using the name "ForwardingWord" by @wks in #976
  • Implement get_gc_trigger() for LockFreeImmortalSpace by @qinsoon in #1003

API

  • Expose alloc_slow. Add a section in user guide about allocation optimization by @qinsoon in #967
  • Use BumpPointer::default() by @qinsoon in #993
  • Fix mention of to_object_reference() in comment by @k-sareen in #998

Documentation

  • Fix rustdoc warnings in Rust 1.73 by @qinsoon in #978
  • Add a section about debugging tips in user guide by @qinsoon in #987
  • Update doc comments by @wks in #1000
  • Add document for release by @qinsoon in #1007
  • Move constants and add comments for stress copying by @wks in #1008
  • Update bibtex of the tracing paper to include the DOI by @caizixian in #1009

CI

  • Fix performance baseline workflow by @qinsoon in #971
  • Allow auto merge binding PRs by @qinsoon in #988
  • Apply a delay before we enable auto merge on a PR by @qinsoon in #992
  • Use cargo generate-lockfile to update JikesRVM's Cargo.lock by @qinsoon in #996

Misc

  • Add option to exclude kernel events from perf results by @k-sareen in #995

Full Changelog: v0.20.0...v0.21.0

MMTk 0.20.0

05 Oct 03:42
9a676e6
Compare
Choose a tag to compare
MMTk 0.20.0 Pre-release
Pre-release

What's Changed

Plan

  • Refactor derive macros and add HasSpaces trait by @wks in #934
  • Make MarkCompact LOS support 2nd transitive closure by @wenyuzhao in #944
  • Disabling PrepareMutator from PlanConstraints by @wks in #964

Policy

API

  • Boot-time configurable heap constants by @wenyuzhao in #899
  • This PR enables transitively pinning (TP) objects from particular roots for Immix/StickyImmix by @udesou in #897
  • Let VM control when or if to read env var options by @wks in #955

Misc

Full Changelog: v0.19.0...v0.20.0

MMTk 0.19.0

24 Aug 08:25
269408b
Compare
Choose a tag to compare
MMTk 0.19.0 Pre-release
Pre-release

0.19.0 (2023-08-18)

What's Changed

Plan

  • Remove a warning in sticky immix trace_object_nursery by @qinsoon in #815
  • Change default plan to GenImmix by @qinsoon in #819

Policy

  • Remove redundant clear_nursery() by @tianleq in #799
  • Introduce VMSpace, and allow VMSpace to be set lazily by @qinsoon in #802
  • Fix an issue that the aligned VM space may not match the original location by @qinsoon in #809
  • Remove some uses of mem::transmute in marksweep block by @qinsoon in #826
  • Fix is_live for ImmixSpace by @wks in #842
  • Sweep abandoned blocks in eager sweeping by @qinsoon in #830
  • Fix VO bits for Immix by @wks in #849
  • Fix unaligned access by @wks in #887

Scheduler

  • Let the coordinator thread open buckets by @wks in #782
  • No coordinator work by @wks in #794

Misc

  • Rename "alloc bit" to "valid-object bit" (VO bit), the second attempt. by @wks in #791
  • Add MarkState. Use MarkState for ImmortalSpace. by @qinsoon in #796
  • Change info logging to debug in ImmortalSpace by @qinsoon in #801
  • Reset nursery_index in finalizable processor if we remove objects from candidates by @qinsoon in #807
  • Allow bulk set side metadata by @qinsoon in #808
  • Some fixes for sanity GC by @qinsoon in #806
  • Use extreme assertion for metadata mapped assert by @wks in #812
  • Install the missing deps for i686 CI tests by @qinsoon in #816
  • Use min nursery as mem balancer's extra memory by @qinsoon in #820
  • Sort dependencies in alphabetical order by @k-sareen in #822
  • Use sysinfo instead of sys-info-rs by @k-sareen in #827
  • Let sysinfo only load memory-related info by @wks in #836
  • Add extreme assertion for barrier slow path calls by @ArberSephirotheca in #833
  • Refactor: Use Atomic<Address> where appropriate by @ClSlaid in #843
  • Update porting guide by @k-sareen in #857
  • Fix typo in doc comment by @k-sareen in #859
  • Replace debug_assert in side_after with assert by @qinsoon in #873
  • Work around stack overflow in array_from_fn by @wks in #876
  • Let ObjectReference implement Ord by @wks in #870
  • Add USDT tracepoints for key GC activities by @caizixian in #883
  • Fix UB in SFTMap implementations by @playXE in #879
  • Run CI build/unit test with latest stable Rust toolchain by @qinsoon in #885
  • Document MSRV policy by @wks in #881
  • Fix performance regression test scripts by @qinsoon in #892
  • Run V8 binding tests on GitHub hosted runner by @caizixian in #900
  • Add tracing tools and documentation by @caizixian in #898
  • Run benchmarks for more plans on OpenJDK by @qinsoon in #901
  • Apply style check on auxiliary crates (macros and dummyvm) by @caizixian in #913
  • Call Collection::out_of_memory if the allocation size is larger than max heap size by @qinsoon in #896
  • Add a unit test for comma-separated bulk option parsing by @caizixian in #911
  • Merge tutorial and porting guide into user guide by @qinsoon in #907
  • Fix broken links in README and cargo doc warnings by @caizixian in #912

API

New Contributors

Full Changelog: v0.18.0...v0.19.0

MMTk 0.18.0

12 Apr 05:29
f8469b0
Compare
Choose a tag to compare
MMTk 0.18.0 Pre-release
Pre-release

0.18.0 (2023-04-03)

Plan

  • Add a new plan, StickyImmix. This is an variant of immix using a sticky mark bit. This plan allows generational behaviors without using a compulsory copying nursery.
  • Side log bits in generational plans are now set using relaxed store for the entire byte as an optimization.

Policy

  • Add constants STRESS_DEFRAG and DEFRAG_EVERY_BLOCK to allow immix to stress defrag copying for debugging.

API

  • Add a new write barrier method object_probable_write. The method can be called before the fields of an object may get updated without a normal write barrier.
  • Add a feature immix_non_moving to replace the current immix_no_defrag feature. This is only intended for debugging uses to rule out issues from copying.

Misc

  • Refactor Mmapper and VMMap. Their implementation is now chosen dynamically, rather than statically based on the pointer size of the architecture. This allows
    us to use a more appropriate implementation to support compressed pointers.
  • Revert changes in d341506 about forwarding bits, and bulk zero side forward bits for defrag source blocks.
  • Fix a bug in the scheduler where a worker may spuriously wake up and attempt to open new buckets while the coordinator is executing a coordinator work packet,
    which would result in an assertion failure.
  • Fix a bug in the mem balancer where subtraction may silently overflow and cause unexpected statistics to be used for computing new heap sizes.
  • Fix a bug where ScanObjectsWork does not properly set the worker when it internally uses ProcessEdgesWork.
  • Fix a bug where nodes pushed during root scanning were not cached for sanity GC.
  • Fix a bug where harness_begin does not force a full heap GC for generational plans.
  • Add info-level logging for each GC to show the memory usage before and after the GC, and elapsed time for the GC.

MMTk 0.17.0

23 Feb 02:26
0fb520a
Compare
Choose a tag to compare
MMTk 0.17.0 Pre-release
Pre-release

Plan

  • Fix a bug where SemiSpace::get_available_pages returned unused pages as 'available pages'. It should return half of the unused pages as 'available'.
  • Fix a bug where generational plans may make full-heap GC decision before all the releasing work is done. Now plans have a Plan::end_of_gc() method
    that is executed after all the GC work is done.
  • Fix a bug where generational plans tended to trigger full heap GCs when heap is full. Now we properly use Appel-style nursery and allow
    the nursery to extend to the heap size.
  • Add a feature immix_zero_on_release as a debug feature for Immix to eagerly zero any reclaimed memory.
  • Fix a bug where the alloc bits for dead objects were still set after the objects were reclaimed. Now Immix eagerly clears the alloc bits
    once the memory is reclaimed.
  • Fix a bug where Immix uses forwarding bits and forwarding pointers but did not declare it.

Allocator

  • Fix a bug about the maximum object size in FreeListAllocator. The allowed maximum object size depends on both the block size and the largest bin size.

Scheduler

  • Add a 'sentinel' mechanism to execute a specified 'sentinel' work packet when a bucket is drained, and prevent the GC from entering the next stage depending
    on the sentinel packet. This makes it possible to expand the transitive closure multiple times. It replaces GCWorkScheduler::closure_end().

API

  • Add a new set of APIs to support binding-specific weak reference processing:
    • Add Scanning::process_weak_refs() and Scanning::forward_weak_refs(). They both supply an ObjectTracerContext argument for retaining and
      updating weak references. Scanning::process_weak_refs() allows a boolean return value to indicate if the method should be called again
      by MMTk after finishing transitive closures for the weak references, which can be used to implement ephemeron.
    • Add Collection::post_forwarding() which is called by MMTk after all weak reference related work is done. A binding can use this call
      for any post processing for weak references, such as enqueue cleared weak references to a queue (Java).
    • These replace old methods for the same purpose, like Collection::process_weak_refs(), Collection::vm_release(), and memory_manager::on_closure_end.

Misc

  • Upgrade the Rust toolchain we use to 1.66.1 and upgrade MSRV to 1.61.0.
  • Improve the boot time significantly for MMTk:
    • Space descriptor map is created as an zeroed vector.
    • Mmapper coalesces the mmap requests for adjancent chunks, and reduces our mmap system calls at boot time.
  • Add GCTrigger to allow different heuristics to trigger a GC:
    • Implement FixedHeapSizeTrigger that triggers the GC when the maximum heap size is reached (the current approach).
    • Implement MemBalancerTrigger (https://dl.acm.org/doi/pdf/10.1145/3563323) as the dynamic heap resize heuristic.
  • Refactor SFTMap so it is dynamically created now.
  • Fix a bug where Address::store dropped the value after store.
  • Fix a bug about an incorrect pointer cast in unsafe code in CommonFreeListPageResource.
  • Remove all inline directives from our code base. We rely on Rust compiler and PGO for inlining decisions.
  • Remove SynchronizedCounter.

MMTk 0.16.0

07 Dec 02:09
4aa6437
Compare
Choose a tag to compare
MMTk 0.16.0 Pre-release
Pre-release

GC Plans

  • Refactor MarkSweep to work with both our native mark sweep policy and the malloc mark sweep policy backed by malloc libraries.

Allocators

  • Add FreeListAllocator which is implemented as a MiMalloc allocator.
  • Fix a bug in ImmixAllocator that alignment is properly taken into consideration when deciding whether to do overflow allocation.

Policies

  • Add MarkSweepSpace:
    • It uses our native MiMalloc implementation in MMTk core.
    • When the feature malloc_mark_sweep is enabled, it uses the selected malloc library to back up its allocation.
  • Malloc mark sweep now accounts for memory based on page usage, and each malloc library may use a different page size.
  • The immix space now uses the newly added BlockPageResource.
  • Changes to Space Function Table (SFT) to improve our boot time and reduce the memory footprint:
    • Rename the current SFT map to SFTSparseChunkMap, and only use it for 32 bits architectures.
    • Add SFTSpaceMap and by default use it for 64 bits architectures.
    • Add SFTDenseChunkMap and use it when we have no control of the virtual address range for a MMTk space on 64 bits architectures.

API

  • Add an option thread_affinity to set processor affinity for MMTk GC threads.
  • Add AllocationSemantics::NonMoving to allocate objects that are known to be non-moving at allocation time.
  • Add ReferenceGlue::is_referent_cleared to allow some bindings to use a special value rather than a normal null reference for a cleared referent.
  • Add pin, unpin, and is_pinned for object pinning. Note that some spaces do not support object pinning, and using these methods may
    cause panic if the space does not support object pinning.
  • Refactor ObjectReference:
    • MMTk core now pervasively uses ObjectModel::ref_to_address to get an address from an object reference for setting per-object side metadata.
    • Add ObjectModel::address_to_ref that does the opposite of ref_to_address: getting an object reference from an address that is returned by ref_to_address.
    • Add ObjectModel::ref_to_header for the binding to tell us the base header address from an object reference.
    • Rename ObjectModel::object_start_ref to ObjectModel::ref_to_object_start (to be consistent with other methods).
    • Remove ObjectModel::OBJECT_REF_OFFSET_BEYOND_CELL, as we no longer use the raw address of an object reference.
    • Add ObjectModel::UNIFIED_OBJECT_REFERENCE_ADDRESS. If a binding uses the same address for ObjectReference, ref_to_address and ref_to_object_start,
      they should set this to true. MMTk can utilize this information for optimization.
    • Add ObjectModel::OBJECT_REF_OFFSET_LOWER_BOUND to specify the minimam value of the possible offsets between an allocation result and object reference's raw address.
  • destroy_mutator() no longer requires a boxed mutator as its argument. Instead, a mutable reference to the mutator is required. It is made clear that the binding should
    manage the lifetime of the boxed mutator from a bind_mutator() call.
  • Remove VMBinding::LOG_MIN_ALIGNMENT and VMBinding::MAX_ALIGNMENT_SHIFT (so we only keep VMBinding::MIN_ALIGNMENT and VMBinding::MAX_ALIGNMENT).

Misc

  • Add a lock-free BlockPageResource that can be used for policies that always allocate memory at the granularity of a fixed sized block.
    This page resource facilitates block allocation and reclamation, and uses lock-free operations where possible.
  • Fix a race condition in FreeListPageResource when multiple threads release pages.
  • Fix a bug in fetch_and/or in our metadata implementation.
  • Fix a bug in side metadata bulk zeroing that may zero unrelated bits if the zeroed region cannot be mapped to whole metadata bytes.
  • Remove unused meta_data_pages_per_region in page resource implementations.
  • Remove the use of MaybeUninit::uninit().assume_init() in FreeListPageResource which has undefined behaviors
    and causes the illegal instruction error with newer Rust toolchains.
  • Remove the trait bound From<Address> and Into<Address> for Region, as we cannot guarantee safe conversion between those two types.
  • Extract Chunk and ChunkMap from the immix policy, and make it available for all the policies.

MMTk 0.15.0

20 Sep 09:49
c5d62c4
Compare
Choose a tag to compare
MMTk 0.15.0 Pre-release
Pre-release

GC Plans

  • Generational plans now support bounded nursery size and fixed nursery size.
  • Immix can be used in a non-moving variant (with no defragmentation) to facilitate early porting stages
    where a non-moving GC is expected by the VM. Enable the feature immix_no_defrag to use the variant.
    Note that this variant performs poorly, compared to normal immix.

API

  • Add mod build_info for bindings to get information about the current build.
  • Add trait Edge. A binding can implement its own edge type if they need more sophisiticated edges than a simple address slot,
    e.g. to support compressed pointers, base pointers with offsets, or tagged pointers.
  • Add APIs for implementing write barriers. MMTk provides subusming barriers object_reference_write() and pre/post write barriers object_reference_write_pre/post().
  • Add APIs for implementing barriers for memory copying such as array_copy in Java. MMTk provides memory_region_copy() (subsuming) and memory_region_copy_pre/post().
  • The ignore_system_g_c option is renamed to ignore_system_gc to be consistent with our naming convention.
  • The max/min_nursery option is replaced by nursery. Bindings can use nursery=Fixed:<size> or Bounded:<size> to config the nursery size.
  • Metadata access methods now requires a type parameter for the metadata value.
  • Metadata compare-exchange methods now return a Result rather than a boolean, which is more consistent with Rust atomic types.
  • Metadata now supports fetch_and, fetch_or and fetch_update.
  • Header metadata access methods in ObjectModel now have default implementations.

Misc

  • Remove all stdout printing in MMTk.
  • Fix a bug that CopySpace should not try zeroing alloc bit if there is no allocation in the space.
  • Fix a few issues in documentation.

MMTk 0.14.0

08 Aug 23:07
a96e8f9
Compare
Choose a tag to compare
MMTk 0.14.0 Pre-release
Pre-release

API

  • ProcessEdgesWork is no longer exposed in the Scanning trait. Instead, RootsWorkFactory is introduced
    for the bindings to create more work packets.
  • Collection::stop_all_mutators() now provides a callback mutator_visitor. The implementation is required
    to call mutator_visitor for each mutator once it is stopped. This requirement was implicit prior to this change.
  • Now MMTk creation is done in the builder pattern:
    • MMTKBuilder is introduced. Command line argument processing API (process() and process_bulk()) now
      takes &MMTKBuilder as an argument instead of &MMTK.
    • gc_init() is renamed to mmtk_init(). mmtk_init() now takes &MMTKBuilder as an argument,
      and returns an MMTk instance Box<MMTK>.
    • heap_size (which used to be an argument for gc_init()) is now an MMTk option.
    • All the options now can be set through the command line argument processing API.
  • Node enqueuing is supported:
    • Add Scanning::support_edge_enqueuing(). A binding may return false if they cannot do edge scanning for certain objects.
    • For objects that cannot be enqueued as edges, Scanning::scan_object_and_trace_edges() will be called.

Scheduler

  • Fixed a bug that may cause deadlock when GC workers are parked and the coordinator is still executing work.

Misc

  • Plan::gc_init() and Space::init() are removed. Initialization is now properly done in the respective constructors.

MMTk 0.13.0

27 Jun 11:29
571a857
Compare
Choose a tag to compare
MMTk 0.13.0 Pre-release
Pre-release

Allocators

  • Fixed a bug that in GC stress testing, the allocator slowpath may double count the allocated bytes.
  • Fixed a bug that in GC stress testing, the Immix allocator may miss the updates to the allocated bytes in some cases.

Scheduler

  • Added work stealing mechanisms to the scheduler: a GC worker may steal work packets from other workers.
  • Fixed a bug that work buckets may be incorrectly opened when there is still work left in workers' local bucket.

API

  • Added an associate type Finalizable to ReferenceGlue, with which, a binding can define their own finalizer type.
  • Added a set of malloc APIs that allows a binding to do malloc using MMTk.
  • Added vm_trace_object() to ActivePlan. When tracing an object that is not in any of MMTk spaces, MMTk will call this method
    and allow bindings to handle the object.

Misc

  • trait TransitiveClosure is split into two different traits: EdgeVisitor and ObjectQueue, and TransitiveClosure is now removed.
  • Fixed a bug that the work packet statistics were not collected correctly if different work packets used the same display name.
  • Fixed a bug that the work packet statistics and the phase statistics use different time units. Now they both use milliseconds.
  • Fixed a bug that acquire_lock was used to lock a larger scope than what was necessary, which caused bad performance when we have many
    allocation threads (e.g. more than 24 threads).

MMTk 0.12.0

17 May 00:05
e027342
Compare
Choose a tag to compare
MMTk 0.12.0 Pre-release
Pre-release

GC Plans

  • Introduced trait PlanTraceObject and procedural macros to derive implementation for it for all the current plans.
  • Introduced a work packet type PlanProcessEdges that uses PlanTraceObject. All the current plans use this type for tracing objects.

Policy

  • Introduced trait PolicyTraceObject. Added an implementation for each policy.

API

  • Preliminary support for Java-style weak reference is added (set the option no_reference_types=false to enable it). Related APIs are slightly changed.
  • The type parameter TransitiveClosure in Scanning::scan_object()/scan_objects() is now replaced with vm::EdgeVisitor.
  • Minor changes to Scanning::scan_object()/scan_objects() so they are more consistent.

Misc

  • Fixed a bug in object forwarding: an object can leave the being-forwarded state without actually being forwarded, and this
    now won't cause a panic.