RFR: 8259928: compiler/{aot,jvmci} tests fail with -Xint

Igor Ignatyev iignatyev at openjdk.java.net
Wed Jan 20 16:12:55 UTC 2021


On Wed, 20 Jan 2021 08:23:26 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> I highly doubt we need to update tests within `hotspot/compiler` directory to ignore obviously incompatible configuration, `-Xint`. they are compiler tests by definitions and having all of them saying `@requires  vm.compMode != "Xint"` (or its equivalent) would be, to say the least, strange.
>> 
>> as of the change, Vladimir is right, `vm.aot` and `vm.jvmci` properties represent build compatibility, and one can still enable jvmci with `-Xint` (granted it won't be used, but that's beyond the point here) hence it shouldn't depend on `Xint`. alternative if we change hotspot to disable jvmci flags when one specifies `Xint` or reports them as conflicted, then your changes would be fine. as wrt AOT, I actually see inability to use AOT together w/ -Xint as a product bug.
>
>> alternative if we change hotspot to disable jvmci flags when one specifies `Xint` or reports them as conflicted, then your changes would be fine. 
> 
> If you run `compiler/jvmci` or `compiler/aot` tests with `-Xint`, then VM would already say:
> 
> $ CONF=linux-x86_64-server-fastdebug make images run-test TEST=compiler/aot TEST_VM_OPTS=-Xint
> ...
> OpenJDK 64-Bit Server VM warning: JVMCI Compiler disabled due to -Xint.
> Exception in thread "main" java.lang.Error: The EnableJVMCI VM option must be true (i.e., -XX:+EnableJVMCI) to use JVMCI
> 	at jdk.internal.vm.ci/jdk.vm.ci.services.Services.checkJVMCIEnabled(Services.java:83)
> 	at jdk.internal.vm.ci/jdk.vm.ci.services.Services.getSavedProperties(Services.java:91)
> 	at jdk.internal.vm.ci/jdk.vm.ci.services.Services.getSavedProperty(Services.java:123)
> 	at jdk.internal.vm.ci/jdk.vm.ci.common.InitTimer.isEnabled(InitTimer.java:76)
> 	at jdk.internal.vm.ci/jdk.vm.ci.common.InitTimer.timer(InitTimer.java:63)
> 	at jdk.internal.vm.compiler at 17-internal/org.graalvm.compiler.hotspot.HotSpotGraalOptionValues.parseOptions(HotSpotGraalOptionValues.java:102)
> 	at jdk.internal.vm.compiler at 17-internal/org.graalvm.compiler.hotspot.HotSpotGraalOptionValues.initializeOptions(HotSpotGraalOptionValues.java:156)
> 	at jdk.internal.vm.compiler at 17-internal/org.graalvm.compiler.hotspot.HotSpotGraalOptionValues.defaultOptions(HotSpotGraalOptionValues.java:84)
> 	at jdk.aot at 17-internal/jdk.tools.jaotc.Main.run(Main.java:173)
> 	at jdk.aot at 17-internal/jdk.tools.jaotc.Main.run(Main.java:136)
> 	at jdk.aot at 17-internal/jdk.tools.jaotc.Main.main(Main.java:92)
> 
> It seems to me that using AOT implies using JVMCI, and JVMCI is disabled at runtime when `-Xint` is supplied. So the change to `vm.aot` and `vm.jvmci` reflects that? I can make it a bit cleaner by checking in `vm.aot` if `vm.jvmci` is enabled.

oh, I see what happened: when I checked if you can enable jvmci w/ `-Xint`, I looked at `UseJVMCICompiler`, which you can enable by some reason, but `EnableJVMCI` will be set to false when you use `-Xint`, so I agree that `vm.jvmci` should check for `-Xint` flag. it might make sense to change this behavior and set all jvmci flags to false whenever `Xint` is used.

for `vm.aot`, I still think it's a product bug if one can't run `jaotc` w/ `Xint`. @vnkozlov, what do you think?
on top of that, I also think that we have a test bug, as options like `Xint` should not be passed to `jaotc` in the majority of aot tests. I'll take closer look at them later today.

Cheers,
-- Igor

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

PR: https://git.openjdk.java.net/jdk/pull/2132


More information about the hotspot-compiler-dev mailing list