RFR: 8359064: Expose reason for marking nmethod non-entrant to JVMCI client
Cesar Soares Lucas
cslucas at openjdk.org
Wed Jun 11 00:05:47 UTC 2025
On Tue, 10 Jun 2025 10:43:07 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> Thank you for working on this. Now #25338 makes even more sense 😄
>>
>> A naive question: is it possible to somehow share the enum definition in hotspot with the Java side in JVMCI? If all change reasons were enums, they would be much easier to understand.
>
>> A naive question: is it possible to somehow share the enum definition in hotspot with the Java side in JVMCI? If all change reasons were enums, they would be much easier to understand.
>
> Not directly but you can have a mirror enum in JVMCI whose ordinal and message could be kept in sync and initialized from native code. As an example, see [jdk.vm.ci.hotspot.HotSpotCompiledCodeStream.Tag](https://github.com/openjdk/jdk/blob/3ff83ec49e561c44dd99508364b8ba068274b63a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotCompiledCodeStream.java#L228).
Thank you for the comments. I added the comments that you asked @dougxc and I did some refactoring around the definition of the ChangeReason enum in the JVMCI API.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25706#issuecomment-2960843655
More information about the graal-dev
mailing list