Skip to content

Weak reference support#145

Merged
qinsoon merged 22 commits into
masterfrom
weak-ref
Apr 28, 2022
Merged

Weak reference support#145
qinsoon merged 22 commits into
masterfrom
weak-ref

Conversation

@qinsoon

@qinsoon qinsoon commented Mar 15, 2022

Copy link
Copy Markdown
Member

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

wenyuzhao commented Apr 2, 2022

Copy link
Copy Markdown
Member

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

qinsoon commented Apr 5, 2022

Copy link
Copy Markdown
Member Author

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 wenyuzhao and wks April 7, 2022 05:32
Comment thread mmtk/src/lib.rs Outdated
Comment thread mmtk/src/reference_glue.rs Outdated

@wks wks left a comment

Copy link
Copy Markdown
Contributor

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