summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.h
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-02-07 12:18:39 -0800
committerMathieu Chartier <mathieuc@google.com>2014-02-08 15:23:36 -0800
commit412c7fced915fc8d4d5e4166e977d55c809168a6 (patch)
treeb8efee7f46a440f3e89765b1e9b2aa6454839c87 /runtime/debugger.h
parent109e2b34799a377a0407781fc32ec1ec607d6c41 (diff)
downloadart-412c7fced915fc8d4d5e4166e977d55c809168a6.zip
art-412c7fced915fc8d4d5e4166e977d55c809168a6.tar.gz
art-412c7fced915fc8d4d5e4166e977d55c809168a6.tar.bz2
Make debugger / jdwp compaction safe.
Fixed GetInstances, GetReferringObjects, CountInstances to use VisitObjects instead of the live bitmap. We now treat the object registry as system weaks and update the objects when/if they move. Also added the recent_allocation_records_ as roots. Bug: 12936165 Change-Id: I615c289efbf2977ceab5c4ffa73d216d799e6e33
Diffstat (limited to 'runtime/debugger.h')
-rw-r--r--runtime/debugger.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/debugger.h b/runtime/debugger.h
index 328c9cd..f1e3f45 100644
--- a/runtime/debugger.h
+++ b/runtime/debugger.h
@@ -452,6 +452,10 @@ class Dbg {
static jbyteArray GetRecentAllocations() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static void DumpRecentAllocations();
+ // Updates the stored direct object pointers (called from SweepSystemWeaks).
+ static void UpdateObjectPointers(RootVisitor* visitor, void* arg)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
enum HpifWhen {
HPIF_WHEN_NEVER = 0,
HPIF_WHEN_NOW = 1,
@@ -476,6 +480,9 @@ class Dbg {
static void DdmSendHeapSegments(bool native)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ static void AllowNewObjectRegistryObjects() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ static void DisallowNewObjectRegistryObjects() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
private:
static void DdmBroadcast(bool connect) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static void PostThreadStartOrStop(Thread*, uint32_t)