Skip to content

Remove outdated fields in PlanConstraints #588

@qinsoon

Description

@qinsoon

PlanConstraints are constant for each plan. But some of its fields are unused, or superseded by other mechanisms.

moves_objects

pub moves_objects: bool,

moves_objects is superseded by may_move_objects() in PlanTraceObject, which is a constant value based on the trace kind. It is helpful for plans like Immix, for which, some traces (defrag) move objects and other traces (fast) do not move objects.

gc_header_bits and gc_header_words

pub gc_header_bits: usize,
pub gc_header_words: usize,

We now have metadata specs, like mark bit, log bit. We no longer need a plan to specify the GC bits/words they need.

num_specialized_scans

pub num_specialized_scans: usize,

This is unused. This seems related with object scanning, which is now in the bindings.

max_non_los_copy_bytes

pub max_non_los_copy_bytes: usize,

This is currently unused. We need to decide whether we need to check object size before copying (currently we assume we won't). The difference is that in one case, we could copy nursery->mature or nursery->LOS, and in the other case, we only copy nursery->mature (large objects are directly allocated into LOS' logical nursery). A related issue: #452.

needs_linear_scan

pub needs_linear_scan: bool,

Java MMTk uses this in object model. I am not sure how it works. We need to further check this. However, for MMTk core, I assume we will allow linear scan in some policies and when global_alloc_bit is enabled. So we may need to make sure this value is set properly.

needs_concurrent_workers

pub needs_concurrent_workers: bool,

Currently unused.

generate_gc_trace

pub generate_gc_trace: bool,

This should be removed. It is related to GCTrace in Java MMTk, and we do not plan to port it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-planArea: PlanC-cleanupCategory: CleanupF-good-first-issueCall For Participation: Suitable issues for first-time contributorsP-normalPriority: Normal.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions