ART: Add more deopt tests
Extend libarttest with the ability to turn off asserts for method
state. Use this to put asserts into test functions, but turn them
off if the test wouldn't react as we want, e.g., when we're in
interpreter mode.
Extend run-test 449 by adding asserts for the method state for the
expected deopt cases. This tests both standard behavior, as well
as single-frame deoptimization.
Bug: 21611912
Change-Id: I27fa5e3e44d8c5eab57962d144c6aec96587bf45
diff --git a/test/088-monitor-verification/src/Main.java b/test/088-monitor-verification/src/Main.java
index fc5755b..2188055 100644
--- a/test/088-monitor-verification/src/Main.java
+++ b/test/088-monitor-verification/src/Main.java
@@ -220,7 +220,7 @@
// Smali testing code.
private static void runSmaliTests() {
- if (!hasOatFile() || runtimeIsSoftFail() || isCallerInterpreted()) {
+ if (!hasOatFile() || runtimeIsSoftFail() || isInterpreted()) {
// Skip test, this seems to be a non-compiled code test configuration.
return;
}
@@ -277,9 +277,9 @@
}
// Helpers for the smali code.
- public static native void assertCallerIsInterpreted();
- public static native void assertCallerIsManaged();
+ public static native void assertIsInterpreted();
+ public static native void assertIsManaged();
public static native boolean hasOatFile();
public static native boolean runtimeIsSoftFail();
- public static native boolean isCallerInterpreted();
+ public static native boolean isInterpreted();
}