summaryrefslogtreecommitdiffstats
path: root/runtime/base
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2014-03-21 17:44:46 +0100
committerSebastien Hertz <shertz@google.com>2014-03-26 11:46:43 +0100
commit4d25df3f76f864b7629ac8c0046d46997f293d8d (patch)
tree31840831d8c81d06ffd575fdb0adc8403cd8dbb1 /runtime/base
parent909f133bc938928a2403baccc983701cb9ebb17f (diff)
downloadart-4d25df3f76f864b7629ac8c0046d46997f293d8d.zip
art-4d25df3f76f864b7629ac8c0046d46997f293d8d.tar.gz
art-4d25df3f76f864b7629ac8c0046d46997f293d8d.tar.bz2
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
Diffstat (limited to 'runtime/base')
-rw-r--r--runtime/base/mutex.cc4
-rw-r--r--runtime/base/mutex.h5
2 files changed, 1 insertions, 8 deletions
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_);