Simplified LXR GC - #1508
Draft
wenyuzhao wants to merge 1754 commits into
Draft
Conversation
qinsoon
reviewed
Jul 31, 2026
| Line::MARK_TABLE | ||
| .bzero_metadata(block.start(), crate::policy::immix::block::Block::BYTES); | ||
| // mark objects if concurrent marking is active | ||
| if self.immix_space().should_allocate_as_live() { |
Member
There was a problem hiding this comment.
I am not sure why it is removed. I didn't find an alternative approach in the PR to mark new allocated objects as live.
Member
There was a problem hiding this comment.
This is added back for non-LXR plans.
qinsoon
reviewed
Jul 31, 2026
| // is a defrag source) for every Immix-family plan, not just plans with reference | ||
| // counting enabled. So this table must always be mapped, regardless of which plan | ||
| // requests it. | ||
| ret.push(crate::policy::immix::block::Block::DEFRAG_STATE_TABLE); |
Member
There was a problem hiding this comment.
This is added by Claude during fixing mmtk-core test/build. It is clearly wrong. We need to revert this.
We let ConcurrentImmix use `add_deferred` for the `Concurrent` bucket like LXR. This simplifies the design so that the `Concurrent` bucket is always flipped during the end of a pause.
This reverts commit 3027b79.
qinsoon
reviewed
Aug 3, 2026
| // as if drained, even though unprocessed concurrent-marking work is still sitting in the | ||
| // now-inactive queue. Keep this the same enable/disable-only mechanism as master unless | ||
| // the plan is LXR. | ||
| let is_lxr = mmtk.get_plan().downcast_ref::<LXR<VM>>().is_some(); |
Member
There was a problem hiding this comment.
This is a workaround for now. Should fix it before merging the PR.
…only skipped for LXR.
qinsoon
reviewed
Aug 3, 2026
| self.reusable_blocks.flush_all(); | ||
| // FIXME: Do we need this for LXR? We observed this to cause fails on conix. | ||
| if !self.rc_enabled { | ||
| self.reusable_blocks.flush_all(); |
Member
There was a problem hiding this comment.
This line was removed from this PR. Now it has been added back for non-LXR plans.
Currently the VO bit is not precise enough for conservative stack scanning because dead objects in lines that also contain live objects will still have VO bits. It is enough for asserting that INC and DEC never operate on dead objects.
We remove methods of `Block` and `Line` if they are already implemented by the `Region` trait. We split `Line::contains` into `Line::contains_obj_start` and `Line::contains_obj_ref` to disambiguate the different intentions.
Fixed build errors. Both master and lxr-x/simplified introduced concurrent GC options. We use the option introduced in master recently. Both master and lxr-x/simplified introduced pause start/end hooks. We combine them and rename them `on_pause_start` and `on_pause_end` to be consistent with the methods in `GCTriggerPolicy`.
Member
|
binding-refs |
We introduce the `UnstraddlableRegion` and move the method `Region::containing(object: ObjectReference)` into it. The primary intention is to prevent the invocation of `Line::containing`. An object may straddle multiple lines. In this case, the line that contains the *starting address* of the object and the line that contains the *raw address* of `ObjectReference` will be different. Removing `Line::containing` will eliminate unintended misuse.
…' into lxr-x/simplified
The SlotIterator was introduced with ConcurrentImmix, and was inspired by the SlotIterator in the LXR branch. Observing from the use case, we find that it is usually used as a method of `ObjectReference`, and is not specific to tracing. We move its implementation to `ObjectReference::iterate_fields`.
The method `Mutator::assert_is_flushed` is never used, and the method `Barrier::assert_is_flushed` was removed long ago.
Move the constants `LOGGED_VALUE` and `UNLOGGED_VALUE` into the `log_bit` module.
We keep the signature of `RootsWorkFactory::create_process_roots_work` unchanged while adding a `create_process_roots_work_with_root_kind` method for LXR and OpenJDK. Currently the `RootKind` contains OpenJDK-specific concerns, and should be made VM-agnostic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRAFT: We may merge this PR as long as the LXR plan is working correctly, even if it still contains code that needs refactoring. This PR should also do its best to keep other parts of MMTk clean. We need to ensure the following issues are resolved before this PR is merged.
This pull request introduces a simplified version of the LXR collector. There are many features not included in this version of LXR, such as reference processing, and they will be ported to the master branch in the future.
In addition to the LXR plan, this PR also makes the following changes to mmtk-core
Pause::RefCount: a new pause kind for reference counting.RootsWorkFactory::create_process_roots_work_with_root_kind: an experimental API withRootKind.ImmixSpaceandLargeObjectSpaceto support reference counting-based Immix plans.UnstraddlableRegionto prevent the invocation ofregion.containson regions which objects can straddle, specificallyLine.ObjectReference::iterate_fields.Related PRs: