RFR: 8340576: Some JVMCI flags are inconsistent

Doug Simon dnsimon at openjdk.org
Tue Sep 24 11:55:45 UTC 2024


On Mon, 23 Sep 2024 17:05:21 GMT, Tom Rodriguez <never at openjdk.org> wrote:

>> This PR replaces some uses of `UseJVMCICompiler` with `EnableJVMCI` so that JVMCI code paths are taken when JVMCI is only used for non-CompilerBroker compilations.
>
> src/hotspot/share/compiler/oopMap.inline.hpp line 69:
> 
>> 67: 
>> 68:   #ifndef COMPILER2
>> 69:       COMPILER1_PRESENT(ShouldNotReachHere();)
> 
> As I noted in a private comment, I think this logic is simply wrong for JVMCI but since we never build JVMCI without C2 we never encounter it.  Derived oops should only be encountered if C2 in available or if EnableJVMCI is true.  I don't really understand the `COMPILER1_PRESENT` guard here either.  It seems like it should be more like:
> 
> #ifndef COMPILER2
> #if INCLUDE_JVMCI
>       if (!EnableJVMCI)
> #endif
>         ShouldNotReachHere();
> #endif // !COMPILER2

Done.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21120#discussion_r1772737069


More information about the hotspot-dev mailing list