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

Scan virtual thread stacks for code cache reclamation candidates #16403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xdaryl
Copy link
Contributor

@0xdaryl 0xdaryl commented Dec 1, 2022

Code cache reclamation reclaims the memory of old method bodies when they are recompiled. The way it proves that an old method body is no longer used is by hooking the GC exit event and walking all active thread stacks looking for methods that are candidates for reclaimation.

This approach does not consider virtual threads, and hence thread stacks for virtual threads that are not presently attached to a J9VMThread must also be scanned in this manner.

Fixes #15939

Signed-off-by: Daryl Maier [email protected]

Code cache reclamation reclaims the memory of old method bodies when
they are recompiled.  The way it proves that an old method body is no
longer used is by hooking the GC exit event and walking all active
thread stacks looking for methods that are candidates for reclaimation.

This approach does not consider virtual threads, and hence thread stacks
for virtual threads that are not presently attached to a J9VMThread must
also be scanned in this manner.

Signed-off-by: Daryl Maier <[email protected]>
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.

Loom: jdk19 OpenJDK Invalid JIT return address ASSERTION FAILED swalk.c:1601
1 participant