-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JDK21] Add support for JVMTI ForceEarlyReturn
Previously, ForceEarlyReturn returned JVMTI_ERROR_OPAQUE_FRAME for a virtual thread. In JDK21, ForceEarlyReturn includes support for virtual threads as per the JVMTI specification: - Error if a virtual thread is not suspended and not the current thread. - Error if a virtual thread is unmounted since it won't be able to force an early return. - For a carrier thread with a virtual thread mounted, the details of the carrier thread are derived from targetThread->currentContinuation. Also, there is no need to halt and resume a thread for inspection since ForceEarlyReturn expects the thread to be suspended as per the JVMTI spec. If a thread is not suspended, it returns JVMTI_ERROR_THREAD_NOT_SUSPENDED. Related: #17713 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Loading branch information
Showing
2 changed files
with
38 additions
and
14 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