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 * @build jdk.test.whitebox.WhiteBox
32 * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
33 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
34 * compiler.ciReplay.TestInliningProtectionDomain
35 */
36
37 package compiler.ciReplay;
38
39 import jdk.test.lib.Asserts;
40
41 import java.util.List;
42
43 public class TestInliningProtectionDomain extends InliningBase {
44
45 public static void main(String[] args) {
46 new TestInliningProtectionDomain(ProtectionDomainTestCompiledBefore.class, true);
47 new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPublic.class, false);
48 new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPrivate.class, false);
49 new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPrivateString.class, false);
50 }
51
52 public TestInliningProtectionDomain(Class<?> testClass, boolean compileBar) {
53 super(testClass);
54 if (compileBar) {
55 commandLineNormal.add("-XX:CompileCommand=compileonly," + testClass.getName() + "::bar");
56 }
57 runTest();
58 }
59
60 @Override
61 public void testAction() {
62 positiveTest(commandLineReplay);
63 String entryString = getTestClass() + " " + "test";
64 boolean inlineFails = testClass == ProtectionDomainTestNoOtherCompilationPrivate.class;
65 int inlineeCount = inlineFails ? 1 : 5;
66
67 List<InlineEntry> inlineesNormal = parseLogFile(LOG_FILE_NORMAL, entryString, "compile_id='" + getCompileIdFromFile(getReplayFileName()) + "'", inlineeCount);
68 List<InlineEntry> inlineesReplay = parseLogFile(LOG_FILE_REPLAY, entryString, "test ()V", inlineeCount);
|
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 * @build jdk.test.whitebox.WhiteBox
32 * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
33 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
34 * compiler.ciReplay.TestInliningProtectionDomain
35 */
36
37 package compiler.ciReplay;
38
39 import jdk.test.lib.Asserts;
40
41 import java.util.List;
42
43 public class TestInliningProtectionDomain extends InliningBase {
44
45 public static void main(String[] args) {
46 new TestInliningProtectionDomain(ProtectionDomainTestCompiledBefore.class, true);
47 new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPublic.class, false);
48 // TODO Re-enable this once 8284443 fixed handling of unloaded return types
49 // new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPrivate.class, false);
50 new TestInliningProtectionDomain(ProtectionDomainTestNoOtherCompilationPrivateString.class, false);
51 }
52
53 public TestInliningProtectionDomain(Class<?> testClass, boolean compileBar) {
54 super(testClass);
55 if (compileBar) {
56 commandLineNormal.add("-XX:CompileCommand=compileonly," + testClass.getName() + "::bar");
57 }
58 runTest();
59 }
60
61 @Override
62 public void testAction() {
63 positiveTest(commandLineReplay);
64 String entryString = getTestClass() + " " + "test";
65 boolean inlineFails = testClass == ProtectionDomainTestNoOtherCompilationPrivate.class;
66 int inlineeCount = inlineFails ? 1 : 5;
67
68 List<InlineEntry> inlineesNormal = parseLogFile(LOG_FILE_NORMAL, entryString, "compile_id='" + getCompileIdFromFile(getReplayFileName()) + "'", inlineeCount);
69 List<InlineEntry> inlineesReplay = parseLogFile(LOG_FILE_REPLAY, entryString, "test ()V", inlineeCount);
|