JDK-8225199 : [Graal] compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java fails with -XX:CompileThresholdScaling=0.1
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-06-03
  • Updated: 2020-04-27
  • Resolved: 2019-06-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.7-oracleFixed 13 b24Fixed 14Fixed
Description
compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java fails when running in Graal as JIT mode and with -XX:CompileThresholdScaling=0.1

java.lang.RuntimeException: Unexpected isMature state for compiled method: expected true to equal false
        at jdk.test.lib.Asserts.fail(Asserts.java:594)
        at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
        at jdk.test.lib.Asserts.assertEQ(Asserts.java:178)
        at compiler.jvmci.compilerToVM.IsMatureVsReprofileTest.test(IsMatureVsReprofileTest.java:84)
        at compiler.jvmci.compilerToVM.IsMatureVsReprofileTest.main(IsMatureVsReprofileTest.java:62)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:830)


The test passes without Graal and also passes with Graal and -Xcomp.

Comments
Fix request (11u) I would like to downport this for parity with 11.0.7-oracle. Applies clean.
27-12-2019

Ok, thanks Vladimir.
03-06-2019

I suggest to set CompileThresholdScaling back to 1. in test: * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbatch + * -XX:CompileThresholdScaling=1.0 * compiler.jvmci.compilerToVM.IsMatureVsReprofileTest Test passed after that.
03-06-2019

Compiler team, could you please have a look and let know if this is Graal issue or the testing configuration is not proper for Graal.
03-06-2019

Step to run the test and reproduce the issue: > make run-test TEST="compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java" TEST_VM_OPTS="-server -ea -esa -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:+UseJVMCICompiler -Djvmci.Compiler=graal -XX:CompileThresholdScaling=0.1"
03-06-2019