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

Vladimir Kozlov kvn at openjdk.java.net
Wed Jan 20 17:07:55 UTC 2021


On Wed, 20 Jan 2021 17:01:50 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> 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
>
>> 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
> 
> JAOTC tool requires JVMCI because it use it with Graal. JAOTC launcher explicitly  enable JVMCI. We may need to add `-Xmixed` there:
> 
> https://github.com/openjdk/jdk/blob/master/make/modules/jdk.aot/Launcher.gmk#L33
> 
> But most AOT tests use AOT compiler wrapper which sets `-Xmixed` (to avoid running with `-Xcomp`):
> 
> https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/aot/AotCompiler.java#L120
> 
> So I am not sure why -Xint overwrite -Xmixed in AOT tests in your example. I used jtreg to run AOT test and it passed:
> $ jtreg -testjdk:/scratch/jdk15u/build/fastdebug/images/jdk/ -va -javaoptions:'-server -Xint' compiler/aot/DeoptimizationTest.java
> ...
> Command line: [/scratch/jdk15u/build/fastdebug/images/jdk/bin/jaotc -J-server -J-Xint -J-XX:-UseCompressedOops -J-classpath -J/scratch/jdk15u/open/test/hotspot/jtreg/JTwork/classes/compiler/aot/DeoptimizationTest.d:/scratch/jdk15u/open/test/hotspot/jtreg/JTwork/classes/test/lib:/scratch/jdk15u/open/test/hotspot/jtreg/JTwork/classes/testlibrary:/scratch/jdk15u/open/test/hotspot/jtreg/JTwork/classes:/scratch/jdk15u/open/test/hotspot/jtreg/compiler/aot --compile-with-assertions --info --output libDeoptimizationTest.so --compile-commands methodsList.txt --class-name compiler.aot.DeoptimizationTest -J-ea -J-esa -J-Xmixed]
> 
> I can't test with JDK 16 and latest because AOT is not included anymore.
> 
> There is issue with using AOTed libraries in other AOT tests which does not have `-Xmixed` in `@run` command when `-Xint` passed because `-XX:+UseAOT` is switched off in such case.

I suggest to fix only `vm.jvmci` since AOT is not part of JDK any more.

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

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


More information about the hotspot-compiler-dev mailing list