diff options
| -rw-r--r-- | test/566-polymorphic-inlining/polymorphic_inline.cc | 18 | ||||
| -rw-r--r-- | test/566-polymorphic-inlining/src/Main.java | 8 | ||||
| -rw-r--r-- | test/knownfailures.json | 5 |
3 files changed, 2 insertions, 29 deletions
diff --git a/test/566-polymorphic-inlining/polymorphic_inline.cc b/test/566-polymorphic-inlining/polymorphic_inline.cc index e44d8a3431..3ca5989f67 100644 --- a/test/566-polymorphic-inlining/polymorphic_inline.cc +++ b/test/566-polymorphic-inlining/polymorphic_inline.cc @@ -53,24 +53,6 @@ static void do_checks(jclass cls, const char* method_name) { CHECK(info.HasInlineInfo()) << method->PrettyMethod(); } -static void allocate_profiling_info(jclass cls, const char* method_name) { - ScopedObjectAccess soa(Thread::Current()); - ObjPtr<mirror::Class> klass = soa.Decode<mirror::Class>(cls); - ArtMethod* method = klass->FindDeclaredDirectMethodByName(method_name, kRuntimePointerSize); - ProfilingInfo::Create(soa.Self(), method, /* retry_allocation */ true); -} - -extern "C" JNIEXPORT void JNICALL Java_Main_ensureProfilingInfo566(JNIEnv*, jclass cls) { - jit::Jit* jit = Runtime::Current()->GetJit(); - if (jit == nullptr) { - return; - } - - allocate_profiling_info(cls, "$noinline$testInvokeVirtual"); - allocate_profiling_info(cls, "$noinline$testInvokeInterface"); - allocate_profiling_info(cls, "$noinline$testInlineToSameTarget"); -} - extern "C" JNIEXPORT void JNICALL Java_Main_ensureJittedAndPolymorphicInline566(JNIEnv*, jclass cls) { jit::Jit* jit = Runtime::Current()->GetJit(); if (jit == nullptr) { diff --git a/test/566-polymorphic-inlining/src/Main.java b/test/566-polymorphic-inlining/src/Main.java index f8354befe7..340a269f5e 100644 --- a/test/566-polymorphic-inlining/src/Main.java +++ b/test/566-polymorphic-inlining/src/Main.java @@ -41,13 +41,10 @@ public class Main implements Itf { itfs[1] = mains[1] = new Subclass(); itfs[2] = mains[2] = new OtherSubclass(); - // Create the profiling info eagerly to make sure they are filled. - ensureProfilingInfo566(); - // 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. - for (int i = 0; i < 1000000; ++i) { + for (int i = 0; i < 0x30000; ++i) { $noinline$testInvokeVirtual(mains[0]); $noinline$testInvokeVirtual(mains[1]); $noinline$testInvokeInterface(itfs[0]); @@ -78,7 +75,7 @@ public class Main implements Itf { // Run this once to make sure we execute the JITted code. $noinline$testInlineToSameTarget(mains[0]); - assertEquals(2000001, counter); + assertEquals(0x60000 + 1, counter); } public Class<?> sameInvokeVirtual() { @@ -125,7 +122,6 @@ public class Main implements Itf { public Object field = new Object(); public static native void ensureJittedAndPolymorphicInline566(); - public static native void ensureProfilingInfo566(); public void increment() { field.getClass(); // null check to ensure we get an inlined frame in the CodeInfo diff --git a/test/knownfailures.json b/test/knownfailures.json index e8b4b30b8d..87dd7c227d 100644 --- a/test/knownfailures.json +++ b/test/knownfailures.json @@ -1345,10 +1345,5 @@ "variant": "jvm", "bug": "b/154802847", "description": ["Failing on RI. Needs further investigating."] - }, - { - "tests": "566-polymorphic-inlining", - "description": "Test needs to be rewritten for tiered JIT.", - "bug": "b/112676029" } ] |