summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-02-07 15:11:51 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-02-07 18:59:41 +0000
commit5757d1c4216bd4f103facea82cdadb2c12b8f62a (patch)
treec403f40bb34759cd39b84f6a271fc52fa58af389
parent5512b4e610f1edba745803053358b07760019f33 (diff)
Force baseline compilation in test.
Because we want inline caches to be filled, force baseline compilation before executing the methods, in case we fail to have them compiled. Test: 566-polymorphic-inlining Change-Id: I42df4d016f111b8b87b258a10def660c04bc7648
-rw-r--r--test/566-polymorphic-inlining/src/Main.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/566-polymorphic-inlining/src/Main.java b/test/566-polymorphic-inlining/src/Main.java
index 691d48f13c..79d21dd1a7 100644
--- a/test/566-polymorphic-inlining/src/Main.java
+++ b/test/566-polymorphic-inlining/src/Main.java
@@ -41,6 +41,12 @@ public class Main implements Itf {
itfs[1] = mains[1] = new Subclass();
itfs[2] = mains[2] = new OtherSubclass();
+ // Compile methods baseline to start filling inline caches.
+ ensureJitBaselineCompiled(Main.class, "$noinline$testInvokeVirtual");
+ ensureJitBaselineCompiled(Main.class, "$noinline$testInvokeInterface");
+ ensureJitBaselineCompiled(Main.class, "$noinline$testInvokeInterface2");
+ ensureJitBaselineCompiled(Main.class, "$noinline$testInlineToSameTarget");
+
// Make $noinline$testInvokeVirtual and $noinline$testInvokeInterface hot to get them jitted.
// We pass Main and Subclass to get polymorphic inlining based on calling
// the same method.
@@ -130,6 +136,7 @@ public class Main implements Itf {
}
public static native boolean ensureJittedAndPolymorphicInline566(String methodName);
+ public static native void ensureJitBaselineCompiled(Class<?> cls, String methodName);
public void increment() {
field.getClass(); // null check to ensure we get an inlined frame in the CodeInfo