diff options
| -rw-r--r-- | test/913-heaps/heaps.cc | 9 | ||||
| -rw-r--r-- | test/913-heaps/src/Main.java | 4 |
2 files changed, 2 insertions, 11 deletions
diff --git a/test/913-heaps/heaps.cc b/test/913-heaps/heaps.cc index 0c627d6af8..49437b150f 100644 --- a/test/913-heaps/heaps.cc +++ b/test/913-heaps/heaps.cc @@ -261,6 +261,8 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_Main_followReferences(JNIEnv* env std::vector<std::string> lines_; }; + jit::ScopedJitSuspend sjs; // Wait to avoid JIT influence (e.g., JNI globals). + // If jniRef isn't null, add a local and a global ref. ScopedLocalRef<jobject> jni_local_ref(env, nullptr); jobject jni_global_ref = nullptr; @@ -299,12 +301,5 @@ jint OnLoad(JavaVM* vm, return 0; } -extern "C" JNIEXPORT void JNICALL Java_Main_waitForJitCompilation(JNIEnv*, jclass) { - jit::Jit* jit = Runtime::Current()->GetJit(); - if (jit != nullptr) { - jit->WaitForCompilationToFinish(Thread::Current()); - } -} - } // namespace Test913Heaps } // namespace art diff --git a/test/913-heaps/src/Main.java b/test/913-heaps/src/Main.java index fc00ada916..a6ace9aeba 100644 --- a/test/913-heaps/src/Main.java +++ b/test/913-heaps/src/Main.java @@ -101,8 +101,6 @@ public class Main { private static void doFollowReferencesTestImpl(A root, int stopAfter, int followSet, Object asRoot, Verifier v, String additionalEnabled) { - waitForJitCompilation(); // Wait to avoid JIT influence (e.g., JNI globals). - String[] lines = followReferences(0, null, root, stopAfter, followSet, asRoot); @@ -388,6 +386,4 @@ public class Main { private static native String[] followReferences(int heapFilter, Class<?> klassFilter, Object initialObject, int stopAfter, int followSet, Object jniRef); - - private static native void waitForJitCompilation(); } |