RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v28]
Alan Bateman
alanb at openjdk.org
Mon Nov 4 08:02:57 UTC 2024
On Mon, 4 Nov 2024 07:21:19 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use lazySubmitRunContinuation when blocking
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1827316145
More information about the core-libs-dev
mailing list