Skip to content

Supporting moving immix (backport #93)#130

Merged
udesou merged 3 commits intov1.9.2+RAIfrom
mergify/bp/v1.9.2+RAI/pr-93
Feb 13, 2024
Merged

Supporting moving immix (backport #93)#130
udesou merged 3 commits intov1.9.2+RAIfrom
mergify/bp/v1.9.2+RAI/pr-93

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Feb 12, 2024

This is an automatic backport of pull request #93 done by Mergify.
Cherry-pick of 1622162 has failed:

On branch mergify/bp/v1.9.2+RAI/pr-93
Your branch is up to date with 'origin/v1.9.2+RAI'.

You are currently cherry-picking commit 1622162.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .github/scripts/ci-build.sh
	modified:   .github/scripts/ci-test-patching.sh
	modified:   .github/workflows/binding-tests.yml
	modified:   .github/workflows/ci.yml
	modified:   mmtk/src/api.rs
	modified:   mmtk/src/edges.rs
	modified:   mmtk/src/julia_finalizer.rs
	modified:   mmtk/src/object_model.rs
	modified:   mmtk/src/util.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   julia/mmtk_julia.c
	both modified:   mmtk/Cargo.lock
	both modified:   mmtk/Cargo.toml
	both modified:   mmtk/api/mmtk.h
	both modified:   mmtk/src/julia_scanning.rs
	both modified:   mmtk/src/lib.rs
	both modified:   mmtk/src/scanning.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

This PR adds support for (partially) moving objects in Julia and should
be merged with mmtk/julia#27 and
mmtk/mmtk-core#897.
- It adds support for pinning/unpinning objects and checking if an
object is pinned (the implementation uses a pin bit).
(`mmtk_pin_object`, `mmtk_unpin_object` and `mmtk_is_pinned`)
- It adds support for providing transitively pinned (`tpinned`) roots .
- It implements the `copy` function in `object_model.rs`. Note that
arrays with inlined data must be treated specially, as their `a->data`
pointer needs to be updated after copying.
- It uses Julia's GC bits to store forwarding information and the
object's header to store the forwarding pointer.
- Currently, all stack roots are transitively pinned. Note that we also
need to traverse the `tls->live_tasks` to make sure that any stack root
from these tasks are transitively pinned.
- `scan_julia_object` had to be adapted to cover a few corner cases:
- when an array object contains a pointer to the owner of the data,
`a->data` needs to be updated in case the owner moves.
- the `using` field inside a `jl_module_t` may also be inlined inside
the module, and if that's the case, we need to make sure that field is
updated if the module moves.
- when marking finalizers, traversing the list of malloced arrays, and
the list of live tasks at the end of GC, we need to updated these lists
with objects that have possibly been moved.
- Added a few debug assertions to capture scanning of misaligned objects
and roots.

NB: I've only tested moving immix; sticky immix is still non-moving.

---------

Co-authored-by: Luis Eduardo de Souza Amorim <[email protected]>
Co-authored-by: Luis Eduardo de Souza Amorim <[email protected]>
Co-authored-by: mmtkgc-bot <[email protected]>
(cherry picked from commit 1622162)

# Conflicts:
#	julia/mmtk_julia.c
#	mmtk/Cargo.lock
#	mmtk/Cargo.toml
#	mmtk/api/mmtk.h
#	mmtk/src/julia_scanning.rs
#	mmtk/src/lib.rs
#	mmtk/src/scanning.rs
@mergify mergify bot added the backport-conflicts The backport pull request has conflicts (automatically added by mergify) label Feb 12, 2024
@mergify mergify bot assigned udesou Feb 12, 2024
@udesou udesou self-requested a review February 13, 2024 04:32
@udesou udesou merged commit 313d3b3 into v1.9.2+RAI Feb 13, 2024
@mergify mergify bot deleted the mergify/bp/v1.9.2+RAI/pr-93 branch February 13, 2024 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-conflicts The backport pull request has conflicts (automatically added by mergify)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant