55 * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed
56 * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI
57 * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false
58 * compiler.jvmci.events.JvmciNotifyInstallEventTest
59 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
60 * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed
61 * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI -XX:JVMCINMethodSizeLimit=0
62 * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false
63 * compiler.jvmci.events.JvmciNotifyInstallEventTest
64 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-EnableJVMCI
65 * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed
66 * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=true
67 * compiler.jvmci.events.JvmciNotifyInstallEventTest
68 */
69
70 package compiler.jvmci.events;
71
72 import compiler.jvmci.common.CTVMUtilities;
73 import compiler.jvmci.common.testcases.SimpleClass;
74 import jdk.test.lib.Asserts;
75 import java.lang.reflect.Method;
76 import jdk.test.lib.Utils;
77 import jdk.vm.ci.hotspot.HotSpotVMEventListener;
78 import jdk.vm.ci.code.CompiledCode;
79 import jdk.vm.ci.code.InstalledCode;
80 import jdk.vm.ci.code.site.DataPatch;
81 import jdk.vm.ci.code.site.Site;
82 import jdk.vm.ci.meta.Assumptions.Assumption;
83 import jdk.vm.ci.meta.ResolvedJavaMethod;
84 import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider;
85 import jdk.vm.ci.hotspot.HotSpotCompiledCode;
86 import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment;
87 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
88 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
89
90 public class JvmciNotifyInstallEventTest implements HotSpotVMEventListener {
91 private static final String METHOD_NAME = "testMethod";
92 private static final boolean FAIL_ON_INIT = !Boolean.getBoolean(
93 "compiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit");
94 private static volatile int gotInstallNotification = 0;
95
96 public static void main(String args[]) {
97 new JvmciNotifyInstallEventTest().runTest();
98 }
99
100 private void runTest() {
101 if (gotInstallNotification != 0) {
102 throw new Error("Got install notification before test actions");
103 }
104 HotSpotCodeCacheProvider codeCache;
105 try {
106 codeCache = (HotSpotCodeCacheProvider) HotSpotJVMCIRuntime.runtime()
107 .getHostJVMCIBackend().getCodeCache();
108 } catch (InternalError ie) {
109 if (FAIL_ON_INIT) {
|
55 * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed
56 * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI
57 * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false
58 * compiler.jvmci.events.JvmciNotifyInstallEventTest
59 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
60 * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed
61 * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI -XX:JVMCINMethodSizeLimit=0
62 * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false
63 * compiler.jvmci.events.JvmciNotifyInstallEventTest
64 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-EnableJVMCI
65 * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed
66 * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=true
67 * compiler.jvmci.events.JvmciNotifyInstallEventTest
68 */
69
70 package compiler.jvmci.events;
71
72 import compiler.jvmci.common.CTVMUtilities;
73 import compiler.jvmci.common.testcases.SimpleClass;
74 import jdk.test.lib.Asserts;
75 import jdk.test.lib.Utils;
76 import jdk.vm.ci.code.CompiledCode;
77 import jdk.vm.ci.code.InstalledCode;
78 import jdk.vm.ci.code.site.DataPatch;
79 import jdk.vm.ci.code.site.Site;
80 import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider;
81 import jdk.vm.ci.hotspot.HotSpotCompiledCode;
82 import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment;
83 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
84 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
85 import jdk.vm.ci.hotspot.HotSpotVMEventListener;
86 import jdk.vm.ci.meta.Assumptions.Assumption;
87 import jdk.vm.ci.meta.ResolvedJavaMethod;
88
89 import java.lang.reflect.Method;
90
91 public class JvmciNotifyInstallEventTest implements HotSpotVMEventListener {
92 private static final String METHOD_NAME = "testMethod";
93 private static final boolean FAIL_ON_INIT = !Boolean.getBoolean(
94 "compiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit");
95 private static volatile int gotInstallNotification = 0;
96
97 public static void main(String args[]) {
98 new JvmciNotifyInstallEventTest().runTest();
99 }
100
101 private void runTest() {
102 if (gotInstallNotification != 0) {
103 throw new Error("Got install notification before test actions");
104 }
105 HotSpotCodeCacheProvider codeCache;
106 try {
107 codeCache = (HotSpotCodeCacheProvider) HotSpotJVMCIRuntime.runtime()
108 .getHostJVMCIBackend().getCodeCache();
109 } catch (InternalError ie) {
110 if (FAIL_ON_INIT) {
|