Integrated: 8315373: Change VirtualThread to unmount after freezing, re-mount before thawing

Alan Bateman alanb at openjdk.org
Sun Sep 10 15:00:53 UTC 2023


On Wed, 30 Aug 2023 13:56:42 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> In the virtual thread implementation, thread identity switches to the carrier before freezing and switches back to the virtual thread after thawing. This was a forced move due to issues getting JVMTI to work with virtual threads. JVMTI can now hide events during transitions so we can invert the sequence back to mounting before running the continuation, unmounting after freezing, and re-mounting after thawing. This sequence is important for future changes that will initiate the freezing from the VM.
> 
> The change requires an update to the JFR thread sampler to skip sampling when it samples during a transition.
> 
> Testing: tier1-5

This pull request has now been integrated.

Changeset: 9a83d558
Author:    Alan Bateman <alanb at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/9a83d55887e5e3a0a2e1e020c6ccb91604672358
Stats:     49 lines in 3 files changed: 12 ins; 17 del; 20 mod

8315373: Change VirtualThread to unmount after freezing, re-mount before thawing

Reviewed-by: pchilanomate, mgronlun, sspitsyn

-------------

PR: https://git.openjdk.org/jdk/pull/15492


More information about the serviceability-dev mailing list