From 4d25df3f76f864b7629ac8c0046d46997f293d8d Mon Sep 17 00:00:00 2001 From: Sebastien Hertz Date: Fri, 21 Mar 2014 17:44:46 +0100 Subject: Refactor deoptimization support in debugger This CL prepares breakpoint support for inlined methods where we'll have to deoptimize everything. We move deoptimization-related information to Dbg class only (deoptimization request queue, full deoptimization event count and deoptimization lock). We replace MethodInstrumentionRequest by DeoptimizationRequest. This is used to know which kind of deoptimization is required for a particular event. It also simplifies lock ordering a bit during event setup: we no longer need to hold the deoptimization lock while holding the breakpoint lock. Moreover, the deoptimization lock should be held only after the event list lock. Bug: 12187616 Change-Id: Iff13f004adaeb25e5d609238bacce0b9720510e6 --- runtime/base/mutex.cc | 4 ---- runtime/base/mutex.h | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'runtime/base') diff --git a/runtime/base/mutex.cc b/runtime/base/mutex.cc index fdf5763..52a1672 100644 --- a/runtime/base/mutex.cc +++ b/runtime/base/mutex.cc @@ -31,7 +31,6 @@ namespace art { Mutex* Locks::abort_lock_ = nullptr; Mutex* Locks::breakpoint_lock_ = nullptr; -Mutex* Locks::deoptimization_lock_ = nullptr; ReaderWriterMutex* Locks::classlinker_classes_lock_ = nullptr; ReaderWriterMutex* Locks::heap_bitmap_lock_ = nullptr; Mutex* Locks::logging_lock_ = nullptr; @@ -812,7 +811,6 @@ void Locks::Init() { // Already initialized. DCHECK(abort_lock_ != nullptr); DCHECK(breakpoint_lock_ != nullptr); - DCHECK(deoptimization_lock_ != nullptr); DCHECK(classlinker_classes_lock_ != nullptr); DCHECK(heap_bitmap_lock_ != nullptr); DCHECK(logging_lock_ != nullptr); @@ -829,8 +827,6 @@ void Locks::Init() { DCHECK(breakpoint_lock_ == nullptr); breakpoint_lock_ = new Mutex("breakpoint lock", kBreakpointLock); - DCHECK(deoptimization_lock_ == nullptr); - deoptimization_lock_ = new Mutex("deoptimization lock", kDeoptimizationLock); DCHECK(classlinker_classes_lock_ == nullptr); classlinker_classes_lock_ = new ReaderWriterMutex("ClassLinker classes lock", kClassLinkerClassesLock); diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h index 55ec1c3..4b881f6 100644 --- a/runtime/base/mutex.h +++ b/runtime/base/mutex.h @@ -537,11 +537,8 @@ class Locks { // Guards breakpoints. static Mutex* breakpoint_lock_ ACQUIRED_AFTER(thread_list_lock_); - // Guards deoptimization requests. - static Mutex* deoptimization_lock_ ACQUIRED_AFTER(breakpoint_lock_); - // Guards trace requests. - static Mutex* trace_lock_ ACQUIRED_AFTER(deoptimization_lock_); + static Mutex* trace_lock_ ACQUIRED_AFTER(breakpoint_lock_); // Guards profile objects. static Mutex* profiler_lock_ ACQUIRED_AFTER(trace_lock_); -- cgit v1.1