summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-03-06 12:13:39 -0800
committerIan Rogers <irogers@google.com>2014-03-06 19:16:01 -0800
commit719d1a33f6569864f529e5a3fff59e7bca97aad0 (patch)
treefcd84efd7b9806b93ec1a44e2317e6f882e7fe0e /runtime/debugger.h
parent5365eea9940269b662cfbe103caa348816ff1558 (diff)
downloadandroid_art-719d1a33f6569864f529e5a3fff59e7bca97aad0.tar.gz
android_art-719d1a33f6569864f529e5a3fff59e7bca97aad0.tar.bz2
android_art-719d1a33f6569864f529e5a3fff59e7bca97aad0.zip
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/debugger.h')
-rw-r--r--runtime/debugger.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/runtime/debugger.h b/runtime/debugger.h
index 5d269ee457..6c44bdea8f 100644
--- a/runtime/debugger.h
+++ b/runtime/debugger.h
@@ -391,7 +391,7 @@ class Dbg {
LOCKS_EXCLUDED(Locks::deoptimization_lock_)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static void DisableFullDeoptimization()
- EXCLUSIVE_LOCKS_REQUIRED(event_list_lock_)
+ LOCKS_EXCLUDED(Locks::deoptimization_lock_)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Manage deoptimization after updating JDWP events list. This must be done while all mutator
@@ -448,8 +448,11 @@ class Dbg {
static void RecordAllocation(mirror::Class* type, size_t byte_count)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static void SetAllocTrackingEnabled(bool enabled);
- static inline bool IsAllocTrackingEnabled() { return recent_allocation_records_ != NULL; }
+ static bool IsAllocTrackingEnabled() {
+ return recent_allocation_records_ != nullptr;
+ }
static jbyteArray GetRecentAllocations() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ static size_t HeadIndex() EXCLUSIVE_LOCKS_REQUIRED(alloc_tracker_lock_);
static void DumpRecentAllocations();
// Updates the stored direct object pointers (called from SweepSystemWeaks).
@@ -488,7 +491,14 @@ class Dbg {
static void PostThreadStartOrStop(Thread*, uint32_t)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- static AllocRecord* recent_allocation_records_;
+ static Mutex* alloc_tracker_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
+
+ static AllocRecord* recent_allocation_records_ PT_GUARDED_BY(alloc_tracker_lock_);
+ static size_t alloc_record_max_ GUARDED_BY(alloc_tracker_lock_);
+ static size_t alloc_record_head_ GUARDED_BY(alloc_tracker_lock_);
+ static size_t alloc_record_count_ GUARDED_BY(alloc_tracker_lock_);
+
+ DISALLOW_COPY_AND_ASSIGN(Dbg);
};
#define CHUNK_TYPE(_name) \