Disable test when the runtime is debuggable.
Test: 837-deopt
Bug: 233021156
Change-Id: Ic7502e840d8e2c44a72051f5d445e325ff097b83
diff --git a/test/837-deopt/src/Main.java b/test/837-deopt/src/Main.java
index 7687683..8e3ad7c 100644
--- a/test/837-deopt/src/Main.java
+++ b/test/837-deopt/src/Main.java
@@ -36,6 +36,11 @@
public static void main(String[] args) throws Throwable {
System.loadLibrary(args[0]);
+ if (isDebuggable()) {
+ // We do not deoptimize with inline caches when the app is debuggable, so just don't run the
+ // test.
+ return;
+ }
test1();
test2();
}
@@ -77,6 +82,7 @@
public static native void ensureJitCompiled(Class<?> cls, String methodName);
public static native void ensureJitBaselineCompiled(Class<?> cls, String methodName);
public static native boolean isInOsrCode(String methodName);
+ public static native boolean isDebuggable();
}
// Define a subclass with another implementation of returnValue to deoptimize $noinline$foo and