diff options
author | Ian Rogers <irogers@google.com> | 2014-03-06 12:13:39 -0800 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-03-06 19:16:01 -0800 |
commit | 719d1a33f6569864f529e5a3fff59e7bca97aad0 (patch) | |
tree | fcd84efd7b9806b93ec1a44e2317e6f882e7fe0e /runtime/monitor.h | |
parent | 5365eea9940269b662cfbe103caa348816ff1558 (diff) | |
download | art-719d1a33f6569864f529e5a3fff59e7bca97aad0.zip art-719d1a33f6569864f529e5a3fff59e7bca97aad0.tar.gz art-719d1a33f6569864f529e5a3fff59e7bca97aad0.tar.bz2 |
Enable annotalysis on clang ART builds.
Fix clang build errors aswell as restructure locking/mutex code for correct
thread safety analysis support.
Reorder make dependencies so that host builds build first as they should
provide better compilation errors than target.
Remove host's use of -fno-omit-frame-pointer as it has no value with correct
use of CFI, which we should have.
Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
Diffstat (limited to 'runtime/monitor.h')
-rw-r--r-- | runtime/monitor.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/monitor.h b/runtime/monitor.h index d0a3a2e..eb07196 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -27,7 +27,6 @@ #include "atomic.h" #include "base/mutex.h" #include "object_callbacks.h" -#include "sirt_ref.h" #include "thread_state.h" namespace art { @@ -37,6 +36,7 @@ namespace mirror { class Object; } // namespace mirror class LockWord; +template<class T> class SirtRef; class Thread; class StackVisitor; @@ -58,11 +58,11 @@ class Monitor { NO_THREAD_SAFETY_ANALYSIS; // TODO: Reading lock owner without holding lock is racy. static mirror::Object* MonitorEnter(Thread* thread, mirror::Object* obj) - EXCLUSIVE_LOCK_FUNCTION(monitor_lock_) + EXCLUSIVE_LOCK_FUNCTION(obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); static bool MonitorExit(Thread* thread, mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) - UNLOCK_FUNCTION(monitor_lock_); + UNLOCK_FUNCTION(obj); static void Notify(Thread* self, mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { @@ -178,6 +178,7 @@ class Monitor { static uint32_t lock_profiling_threshold_; Mutex monitor_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; + ConditionVariable monitor_contenders_ GUARDED_BY(monitor_lock_); // Number of people waiting on the condition. |