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/debugger.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/debugger.cc') diff --git a/runtime/debugger.cc b/runtime/debugger.cc index 7144577..a1ae236 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -3153,6 +3153,11 @@ static const Breakpoint* FindFirstBreakpointForMethod(mirror::ArtMethod* m) return nullptr; } +bool Dbg::MethodHasAnyBreakpoints(mirror::ArtMethod* method) { + ReaderMutexLock mu(Thread::Current(), *Locks::breakpoint_lock_); + return FindFirstBreakpointForMethod(method) != nullptr; +} + // Sanity checks all existing breakpoints on the same method. static void SanityCheckExistingBreakpoints(mirror::ArtMethod* m, DeoptimizationRequest::Kind deoptimization_kind) -- cgit v1.1