From d8565456d29f4ad05f11cf84d2d2dac488508e06 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 26 Mar 2015 09:41:50 -0700 Subject: Fix ClassLinker::MayBeCalledWithDirectCodePointer for JIT Currently, we don't know if another method has a direct code pointer or not. This should fix the case where breakpoints occasionally don't work with JIT. The JIT now also checks that a method doesn't have any breakpoints before starting to compile it. Bug: 17950037 Change-Id: I17cfe874fe4825beba23903a5053d5cb27e106cb --- runtime/class_linker.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/class_linker.cc') diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 67872d76ae..b0708a6c0e 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -5286,6 +5286,10 @@ std::size_t ClassLinker::ClassDescriptorHashEquals::operator()(const char* descr } bool ClassLinker::MayBeCalledWithDirectCodePointer(mirror::ArtMethod* m) { + if (Runtime::Current()->UseJit()) { + // JIT can have direct code pointers from any method to any other method. + return true; + } // Non-image methods don't use direct code pointer. if (!m->GetDeclaringClass()->IsBootStrapClassLoaded()) { return false; -- cgit v1.2.3-59-g8ed1b