RFR(XS): fix c2-only compilation and some tests

Liu Xin navy.xliu at gmail.com
Thu Jul 26 17:16:10 UTC 2018


Hi, hotspot community,


Please review the small change to get c2-only build to work.



Bug: https://bugs.openjdk.java.net/browse/JDK-8207965

Webrev: http://cr.openjdk.java.net/~phh/8207965/webrev.00/



It will meet 2 compiler errors if you configure project with “./configure
--with-jvm-features=-compiler1 --enable-option-checking=fatal
--with-debug-level=fastdebug”.



the configure disable c1. Furthermore,  12 failures in hs-tier1 if we have
c2-only.


C2-only built met the following errors when I ran hs-tier1:

compiler/aot/cli/jaotc/CompileClassWithDebugTest.java: check that jaotc can
compile a class with a --debug flag
compiler/jvmci/compilerToVM/IsCompilableTest.java:
compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java:
compiler/jvmci/events/JvmciNotifyInstallEventTest.java:
compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java:
compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java:
compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java:
compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java:
compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java:
compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java:
compiler/types/TestMeetIncompatibleInterfaceArrays.java: C2 can not handle
returns with incompatible interface arrays



Most due to bug similar with JDK-8145331
<https://bugs.openjdk.java.net/browse/JDK-8145331>.


CompilerDirectives::get_for(AbstractCompiler *comp)  returns _*c1*_store

 if jvmci() enabled, but hotspot won’t enable it if COMPILER1 is disabled.
As a result, hotspot messes up refcounts of _c1_store. This webrev fixes 11
out of 12 cases.


The last test (compiler/types/TestMeetIncompatibleInterfaceArrays.java)
makes use of WhiteBox to check tier levels. I can’t fix it easily. Shall I
try to fix it in this webrev? If no, we can file a new bug to fix the test.
Does anyone have any idea how to fix it?


thanks,

--lx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20180726/c805f25e/attachment.html>


More information about the hotspot-compiler-dev mailing list