On Mon, 4 Nov 2024 07:59:22 GMT, Alan Bateman <al...@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

Reply via email to