Skip to content

Trace pinned objects as roots #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2025

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Jun 24, 2025

Following the suggestion in #89 (comment), trace recently added pinned objects as roots. When we pass those objects as 'nodes' to MMTk, MMTk does not know the slots so MMTk cannot update the reference, thus MMTk will not move those objects. This is essentially the same as pinning those objects before a GC, and unpinning after a GC.

@qinsoon qinsoon requested review from udesou and d-netto June 24, 2025 09:15
Copy link
Collaborator

@d-netto d-netto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally, this looks fine.

I was wondering whether we should rename pinned_objects. The name seems a bit misleading since they are basically roots now.

@qinsoon
Copy link
Member Author

qinsoon commented Jun 26, 2025

@d-netto @udesou Can we merge this?

Copy link
Collaborator

@d-netto d-netto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Before merging this PR, please make sure you're able to build Julia with it, and that it doesn't degrade fragmentation or runtime in the inference benchmark.

@udesou
Copy link

udesou commented Jun 26, 2025

LGTM. Before merging this PR, please make sure you're able to build Julia with it, and that it doesn't degrade fragmentation or runtime in the inference benchmark.

Ditto.

@qinsoon
Copy link
Member Author

qinsoon commented Jun 27, 2025

Fragmentation and performance is similar as before.
inference_benchmark_fragmentation_combined

@qinsoon qinsoon merged commit 1a472bb into mmtk:mmtk-support-moving-upstream Jun 27, 2025
3 checks passed
udesou pushed a commit to udesou/julia that referenced this pull request Jul 30, 2025
Following the suggestion in mmtk#89 (comment), trace recently added pinned objects as roots. When we pass those objects as 'nodes' to MMTk, MMTk does not know the slots so MMTk cannot update the reference, thus MMTk will not move those objects. This is essentially the same as pinning those objects before a GC, and unpinning after a GC.
udesou pushed a commit to udesou/julia that referenced this pull request Aug 1, 2025
Following the suggestion in mmtk#89 (comment), trace recently added pinned objects as roots. When we pass those objects as 'nodes' to MMTk, MMTk does not know the slots so MMTk cannot update the reference, thus MMTk will not move those objects. This is essentially the same as pinning those objects before a GC, and unpinning after a GC.
udesou pushed a commit to udesou/julia that referenced this pull request Aug 5, 2025
Following the suggestion in mmtk#89 (comment), trace recently added pinned objects as roots. When we pass those objects as 'nodes' to MMTk, MMTk does not know the slots so MMTk cannot update the reference, thus MMTk will not move those objects. This is essentially the same as pinning those objects before a GC, and unpinning after a GC.
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.

3 participants