forked from eclipse-openj9/openj9
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spin during VirtualThread MountBegin and UnmountBegin
Currently, the halt flag is set in VirtualThread MountEnd if a virtual thread is suspended via JVMTI, and in VirtualThread UnmountEnd if a carrier thread is suspended via JVMTI. In the above approach, the halt flag is set too late. As soon as the continuation swaps the J9VMThread context, the thread begins execution and is capable of triggering JVMTI events. To avoid the above issue, the above steps are moved into VirtualThread MountBegin and UnmountBegin. This prevents the continuation to swap the J9VMThread context. Currently, the halt flag is set without invoking exitVThreadTransitionCritical. This prevents JVMTI to resume the halted thread and cause a hang. The new approach spins, invokes exitVThreadTransitionCritical and releases VM access to allow JVMTI to resume the suspended thread. The better approach will be to fail mount if the thread is suspended and retry later. Currently, his approach cannot be implemented because VirtualThread.java does not support this approach. Related: eclipse-openj9#17865 Related: eclipse-openj9#17869 Related: eclipse-openj9#18370 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Loading branch information
Showing
3 changed files
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters