Skip to content
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

Weak reference support #145

Merged
merged 22 commits into from
Apr 28, 2022
Merged

Weak reference support #145

merged 22 commits into from
Apr 28, 2022

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Mar 15, 2022

This adds weak reference support, and updates MMTk core to mmtk/mmtk-core#564.

  • if weak reference is enabled in MMTk, we will add weak references during our tracing. Otherwise, still treat them as strong references.
  • implement new changes in Weak reference processing mmtk-core#564
  • add test with weak reference enabled (by default, it is disabled).

@wenyuzhao
Copy link
Member

wenyuzhao commented Apr 2, 2022

FYI this is the change that fixed the weak processor wenyuzhao@1bd175f. This is also a part of #141. This change removes the code that treats all the WeakProcessor objects as roots. I'm afraid without this fix, a lot of weak objects will be kept alive. We should include the change in this PR to deal with weak pointers correctly. Probably this will also yield better performance.

@qinsoon
Copy link
Member Author

qinsoon commented Apr 5, 2022

FYI this is the change that fixed the weak processor wenyuzhao@1bd175f. This is also a part of #141. This change removes the code that treats all the WeakProcessor objects as roots. I'm afraid without this fix, a lot of weak objects will be kept alive. We should include the change in this PR to deal with weak pointers correctly. Probably this will also yield better performance.

@wenyuzhao It seems, to apply the changes in the commit, I need to remove the use of MMTkRootScanWorkScope. Otherwise, I will see must not call oops_do_marking_prologue twice in a row.

@qinsoon qinsoon marked this pull request as ready for review April 7, 2022 05:26
@qinsoon qinsoon requested review from wks and wenyuzhao April 7, 2022 05:32
mmtk/src/lib.rs Outdated Show resolved Hide resolved
mmtk/src/reference_glue.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@wks wks left a comment

Choose a reason for hiding this comment

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

LGTM

@qinsoon qinsoon merged commit e8da68f into master Apr 28, 2022
@k-sareen k-sareen deleted the weak-ref branch April 27, 2023 05:03
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