[−][src]Module mmtk::vm
MMTk-to-VM interface: the VMBinding trait.
This module provides VM-specific traits that serve as MMTK-to-VM interfaces.
Each VM binding needs to provide an implementation for each of the traits.
MMTk requires the interfaces to be efficient, as some of the methods are called frequently
during collection (e.g. the methods for ObjectModel
). We rely on cross-crate link-time-optimization
to remove the overhead of MMTk invoking methods on those traits.
It is recommended for a VM binding that uses mmtk-core to do the following to ensure LTO is enabled for performance.
- Add the following section in the manifest file of a VM binding (
Cargo.toml
). This enables LTO for the release build:[profile.release] lto = true
- Make sure that the crate type for a VM binding supports LTO. To our knowledge,
staticlib
andcdylib
support LTO, andrlib
does not support LTO.
Traits
ActivePlan | VM-specific methods for the current plan. |
Collection | VM-specific methods for garbage collection. |
ObjectModel | VM-specific methods for object model. |
ReferenceGlue | VM-specific methods for reference processing. |
Scanning | VM-specific methods for scanning roots/objects. |
VMBinding | The |