From 412c7fced915fc8d4d5e4166e977d55c809168a6 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Fri, 7 Feb 2014 12:18:39 -0800 Subject: 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 --- runtime/runtime.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/runtime.cc') diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 17afb43..09d05d1 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -379,6 +379,7 @@ void Runtime::SweepSystemWeaks(RootVisitor* visitor, void* arg) { GetInternTable()->SweepInternTableWeaks(visitor, arg); GetMonitorList()->SweepMonitorList(visitor, arg); GetJavaVM()->SweepJniWeakGlobals(visitor, arg); + Dbg::UpdateObjectPointers(visitor, arg); } static gc::CollectorType ParseCollectorType(const std::string& option) { @@ -1495,12 +1496,14 @@ void Runtime::DisallowNewSystemWeaks() { monitor_list_->DisallowNewMonitors(); intern_table_->DisallowNewInterns(); java_vm_->DisallowNewWeakGlobals(); + Dbg::DisallowNewObjectRegistryObjects(); } void Runtime::AllowNewSystemWeaks() { monitor_list_->AllowNewMonitors(); intern_table_->AllowNewInterns(); java_vm_->AllowNewWeakGlobals(); + Dbg::AllowNewObjectRegistryObjects(); } void Runtime::SetCalleeSaveMethod(mirror::ArtMethod* method, CalleeSaveType type) { -- cgit v1.1