From ad0c8bdc2c2e4d2a469455bcde7aeb5fc7482875 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 19 Dec 2016 19:31:26 +0000 Subject: Revert "Fix JIT crash due to unverified dead code" Broke method_verifier_test and image_test. Bug: 31000839 This reverts commit 132eb43396bdb0b9bdacf069289f019d85d358fc. Change-Id: I85923e6bdb3e76f54978658aad816d4c79fc339e --- test/common/runtime_state.cc | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'test/common/runtime_state.cc') diff --git a/test/common/runtime_state.cc b/test/common/runtime_state.cc index f26e122580..285f3aa541 100644 --- a/test/common/runtime_state.cc +++ b/test/common/runtime_state.cc @@ -188,28 +188,4 @@ extern "C" JNIEXPORT jboolean JNICALL Java_Main_hasSingleImplementation(JNIEnv* return method->HasSingleImplementation(); } -extern "C" JNIEXPORT int JNICALL Java_Main_getHotnessCounter(JNIEnv* env, - jclass, - jclass cls, - jstring method_name) { - jit::Jit* jit = Runtime::Current()->GetJit(); - if (jit == nullptr) { - // The hotness counter is valid only under JIT. - // If we don't JIT return 0 to match test expectations. - return 0; - } - - ArtMethod* method = nullptr; - { - ScopedObjectAccess soa(Thread::Current()); - - ScopedUtfChars chars(env, method_name); - CHECK(chars.c_str() != nullptr); - method = soa.Decode(cls)->FindDeclaredDirectMethodByName( - chars.c_str(), kRuntimePointerSize); - } - - return method->GetCounter(); -} - } // namespace art -- cgit v1.2.3-59-g8ed1b