RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning
Patricio Chilano Mateo
pchilanomate at openjdk.org
Wed Nov 6 17:53:00 UTC 2024
On Mon, 4 Nov 2024 07:59:22 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/vm/Continuation.java line 62:
>>
>>> 60: NATIVE(2, "Native frame or <clinit> on stack"),
>>> 61: MONITOR(3, "Monitor held"),
>>> 62: CRITICAL_SECTION(4, "In critical section");
>>
>> Is there a reason that the `reasonCode` values does not match the `freeze_result` reason values used in `pinnedReason(int reason)` to create one of these?
>>
>> I cannot see that it is used either. Only seem to be read for JFR VirtualThreadPinned Event which only uses the string.
>
> That's a good question as they should match. Not noticed as it's not currently used. As it happens, this has been reverted in the loom repo as part of improving this code and fixing another issue.
>
> Related is the freeze_result enum has new members, e.g. freeze_unsupported for LM_LEGACY, that don't have a mapping to a Pinned, need to check if we could trip over that.
These have been updated with the latest JFR changes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1831465256
More information about the core-libs-dev
mailing list