< prev index next >

test/hotspot/jtreg/compiler/ciReplay/TestInliningProtectionDomain.java

Print this page

 25  * @test
 26  * @bug 8275868
 27  * @library / /test/lib
 28  * @summary Testing that ciReplay inlining does not fail with unresolved signature classes.
 29  * @requires vm.flightRecorder != true & vm.compMode != "Xint" & vm.compMode != "Xcomp" & vm.debug == true & vm.compiler2.enabled
 30  * @modules java.base/jdk.internal.misc
 31  * @run driver compiler.ciReplay.TestInliningProtectionDomain
 32  */
 33 
 34 package compiler.ciReplay;
 35 
 36 import jdk.test.lib.Asserts;
 37 
 38 import java.util.List;
 39 
 40 public class TestInliningProtectionDomain extends InliningBase {
 41 
 42     public static void main(String[] args) {
 43         new TestInliningProtectionDomain(ProtectionDomainTestCompiledBefore.class, true);
 44         new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPublic.class, false);
 45         new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPrivate.class, false);

 46         new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPrivateString.class, false);
 47     }
 48 
 49     public TestInliningProtectionDomain(Class<?> testClass, boolean compileBar) {
 50         super(testClass);
 51         if (compileBar) {
 52             commandLineNormal.add("-XX:CompileCommand=compileonly," + testClass.getName() + "::bar");
 53         }
 54         runTest();
 55     }
 56 
 57     @Override
 58     public void testAction() {
 59         positiveTest(commandLineReplay);
 60         String entryString = getTestClass() + " " + "test";
 61         boolean inlineFails = testClass == ProtectionDomainTestNoOtherCompilationPrivate.class;
 62         int inlineeCount = inlineFails ? 1 : 5;
 63 
 64         List<InlineEntry> inlineesNormal = parseLogFile(LOG_FILE_NORMAL, entryString, "compile_id='" + getCompileIdFromFile(getReplayFileName()) + "'", inlineeCount);
 65         List<InlineEntry> inlineesReplay = parseLogFile(LOG_FILE_REPLAY, entryString, "test ()V", inlineeCount);

 25  * @test
 26  * @bug 8275868
 27  * @library / /test/lib
 28  * @summary Testing that ciReplay inlining does not fail with unresolved signature classes.
 29  * @requires vm.flightRecorder != true & vm.compMode != "Xint" & vm.compMode != "Xcomp" & vm.debug == true & vm.compiler2.enabled
 30  * @modules java.base/jdk.internal.misc
 31  * @run driver compiler.ciReplay.TestInliningProtectionDomain
 32  */
 33 
 34 package compiler.ciReplay;
 35 
 36 import jdk.test.lib.Asserts;
 37 
 38 import java.util.List;
 39 
 40 public class TestInliningProtectionDomain extends InliningBase {
 41 
 42     public static void main(String[] args) {
 43         new TestInliningProtectionDomain(ProtectionDomainTestCompiledBefore.class, true);
 44         new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPublic.class, false);
 45         // TODO Re-enable this once 8284443 fixed handling of unloaded return types
 46         // new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPrivate.class, false);
 47         new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPrivateString.class, false);
 48     }
 49 
 50     public TestInliningProtectionDomain(Class<?> testClass, boolean compileBar) {
 51         super(testClass);
 52         if (compileBar) {
 53             commandLineNormal.add("-XX:CompileCommand=compileonly," + testClass.getName() + "::bar");
 54         }
 55         runTest();
 56     }
 57 
 58     @Override
 59     public void testAction() {
 60         positiveTest(commandLineReplay);
 61         String entryString = getTestClass() + " " + "test";
 62         boolean inlineFails = testClass == ProtectionDomainTestNoOtherCompilationPrivate.class;
 63         int inlineeCount = inlineFails ? 1 : 5;
 64 
 65         List<InlineEntry> inlineesNormal = parseLogFile(LOG_FILE_NORMAL, entryString, "compile_id='" + getCompileIdFromFile(getReplayFileName()) + "'", inlineeCount);
 66         List<InlineEntry> inlineesReplay = parseLogFile(LOG_FILE_REPLAY, entryString, "test ()V", inlineeCount);
< prev index next >