[11] RFR(XS) 8206953: compiler/profiling/TestTypeProfiling.java fails when JVMCI build disabled

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Jul 12 01:20:04 UTC 2018


http://cr.openjdk.java.net/~kvn/8206953/webrev.00/

https://bugs.openjdk.java.net/browse/JDK-8206953

Original JVMCI patch changed behavior how exception are recorded in MDO [1] even when JVMCI is not used.

Originally when method executed in Interpreter throws ClassCastException it will incremented number 
of class_cast traps in method's MDO. later when C2 see that it will inline throw code instead of 
generating uncommon trap to avoid useless deoptimization [2].

Test TestTypeProfiling.java was added recently and checks deoptimization events based on behaviour 
introduced with JVMCI. But when JVMCI is not build (PPC64, s360 and my testing for JDK-8206135) test 
will fail.

The fix restored original behavior when C2 is used by checking if Graal is not used. The test was 
also fixed. Note, test runs only with C2.

Did full tier1-3,xcomp, also tier1-2 without JVMCI testing.

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/0d28f82ecac6/src/hotspot/share/runtime/deoptimization.cpp#l2046
[2] http://hg.openjdk.java.net/jdk/jdk/file/0d28f82ecac6/src/hotspot/share/opto/graphKit.cpp#l539

Thanks,
Vladimir


More information about the hotspot-compiler-dev mailing list