RFR: 8315373: Change VirtualThread to unmount after freezing, re-mount before thawing
Markus Grönlund
mgronlun at openjdk.org
Fri Sep 1 10:50:40 UTC 2023
On Thu, 31 Aug 2023 19:28:50 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> There are some native methods that we execute during mount/unmount transitions. From what I see they all seem to be defined as `@IntrinsicCandidate`, but if for some reason we don't execute the intrinsic version (interp only mode for instance) then we would call a normal native method.
>
> Just to add that Patricio suggested today to run the stress tests with -Xint and that does lead to triggering the assert quickly when the thread is sampled in native. There are several native methods that are @IntrinsicCandidate that are invoked after the thread identity has changed to the virtual thread and before the continuation is mounted. Probably less likely on the unmount as the only native method is the one that reverts the thread identity.
Ok. If the thread can run native code as part of the mount / unmount, and the sampler can see the intermediary state there too, the check is needed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15492#discussion_r1312875905
More information about the serviceability-dev
mailing list