diff options
| -rw-r--r-- | runtime/debugger.cc | 3 | ||||
| -rw-r--r-- | runtime/jdwp/object_registry.h | 31 |
2 files changed, 25 insertions, 9 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc index 488e6e73dd..c994f0b629 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -1158,7 +1158,8 @@ void Dbg::GetClassList(std::vector<JDWP::RefTypeId>* classes) { }; ClassListCreator clc(classes); - Runtime::Current()->GetClassLinker()->VisitClasses(ClassListCreator::Visit, &clc); + Runtime::Current()->GetClassLinker()->VisitClassesWithoutClassesLock(ClassListCreator::Visit, + &clc); } JDWP::JdwpError Dbg::GetClassInfo(JDWP::RefTypeId class_id, JDWP::JdwpTypeTag* pTypeTag, diff --git a/runtime/jdwp/object_registry.h b/runtime/jdwp/object_registry.h index 0e46d5cf20..f2f43c41e0 100644 --- a/runtime/jdwp/object_registry.h +++ b/runtime/jdwp/object_registry.h @@ -80,10 +80,14 @@ class ObjectRegistry { void Clear() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - void DisableCollection(JDWP::ObjectId id) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - void EnableCollection(JDWP::ObjectId id) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + void DisableCollection(JDWP::ObjectId id) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(lock_); - bool IsCollected(JDWP::ObjectId id) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + void EnableCollection(JDWP::ObjectId id) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(lock_); + + bool IsCollected(JDWP::ObjectId id) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(lock_); void DisposeObject(JDWP::ObjectId id, uint32_t reference_count) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); @@ -94,13 +98,24 @@ class ObjectRegistry { private: JDWP::ObjectId InternalAdd(mirror::Object* o) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(Locks::thread_list_lock_); + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) + LOCKS_EXCLUDED(lock_, Locks::thread_list_lock_); + mirror::Object* InternalGet(JDWP::ObjectId id, JDWP::JdwpError* error) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - void Demote(ObjectRegistryEntry& entry) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_, lock_); - void Promote(ObjectRegistryEntry& entry) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_, lock_); + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) + LOCKS_EXCLUDED(lock_); + + void Demote(ObjectRegistryEntry& entry) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) + EXCLUSIVE_LOCKS_REQUIRED(lock_); + + void Promote(ObjectRegistryEntry& entry) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) + EXCLUSIVE_LOCKS_REQUIRED(lock_); + bool Contains(mirror::Object* o, ObjectRegistryEntry** out_entry) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(lock_); + bool ContainsLocked(Thread* self, mirror::Object* o, int32_t identity_hash_code, ObjectRegistryEntry** out_entry) EXCLUSIVE_LOCKS_REQUIRED(lock_) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); |