Skip to content

Configurable mock vm - #1598

Draft
qinsoon wants to merge 11 commits into
mmtk:masterfrom
qinsoon:configurable-mock-vm
Draft

qinsoon wants to merge 11 commits into
mmtk:masterfrom
qinsoon:configurable-mock-vm

Conversation

@qinsoon

@qinsoon qinsoon commented Sep 23, 2026

Copy link
Copy Markdown
Member

This PR allows tests to create a custom MockVM type with different constant values through a macro define_mock_vm.

Built on top of #1408. I will make this PR ready when #1408 is merged.

qinsoon and others added 10 commits October 21, 2025 04:20
Conflict resolution and fixes needed after the merge:
- Adopt master's disable_collection()/enable_collection() API in place of the
  removed MockVM::is_collection_enabled.
- Add GLOBAL_FIELD_UNLOG_BIT_SPEC to both mock metadata layouts, and keep the
  mark bit on the side in the header layout (required by LXR).
- Make header metadata the default when mock_test_side_metadata is not set, so
  `--features mock_test` alone builds (used by ci-build.sh), and reject
  enabling both layouts.
- Drop the mock-only side metadata base address; master computes it dynamically.
- Run LXR mock tests with header metadata in ci-test.sh, as LXR requires
  in-header forwarding bits.
- Port new master mock tests to this branch's MockVM: use fixture.mutator(),
  pass `force` to handle_user_collection_request, wrap mock_test_shutdown in
  with_mockvm, and stop the OOM-unwind test from spawning GC workers.
- Use inspect_err now that MSRV is 1.84.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@qinsoon qinsoon mentioned this pull request Sep 27, 2026
Master includes the squashed mock-vm-gc (mmtk#1408), which shares no history with
this branch. Resolve the conflicts using fa4441d (where this branch forked
from mock-vm-gc) as the base, so the result is master plus this branch's
MockVMConfig change:
- Take master's updated linear scan, thread_park, and the removal of
  mock_test_allocate_offset.
- Keep this branch's CI scripts without the mock_test_*_metadata features.
- vm.rs: keep the generic with_mockvm, and use ThreadPark::contains (renamed
  on master) with as_generic_mock_mutator.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant