Module mmtk::util::metadata::vo_bit::helper

source ·
Expand description

This module updates of VO bits during GC. It is used for spaces that do not clear the metadata of some dead objects during GC. Currently, only ImmixSpace is affected.

PolicyWhen are VO bits of dead objects cleared
MarkSweepSpacewhen sweeping cells of dead objects
MarkCompactSpacewhen compacting
CopySpacewhen releasing the space

The policies listed above trivially clear the VO bits for dead objects (individually or in bulk), and make the VO bits available during tracing.

For ImmixSpace, if a line contains both live and dead objects, live objects will be traced, but dead objects will not be visited. Therefore we cannot clear the VO bits of individual dead objects. We cannot clear all VO bits for the line in bulk because it contains live objects. This module updates the VO bits for such regions (e.g. Immix lines, or Immix blocks if Immix is configured to be block-only).

We implement several strategies depending on whether mmtk-core or the VM binding also requires the VO bits to also be available during tracing.

The handling is very sensitive to VOBitUpdateStrategy, and may be a bit verbose. We abstract VO-bit-related code out of the main GC algorithms (such as Immix) to make it more readable.

Enums§

Functions§