From 83c8ee000d525017ead8753fce6bc1020249b96a Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 28 Jan 2014 14:50:23 -0800 Subject: Add root types and thread id to root visiting. Enables us to pass the root type and thread id to hprof. Bug: 12680863 Change-Id: I6a0f1f9e3aa8f9b4033d695818ae7ca3460d67cb --- runtime/jdwp/object_registry.cc | 4 ++-- runtime/jdwp/object_registry.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/jdwp') diff --git a/runtime/jdwp/object_registry.cc b/runtime/jdwp/object_registry.cc index 40ba3e3..49dceb2 100644 --- a/runtime/jdwp/object_registry.cc +++ b/runtime/jdwp/object_registry.cc @@ -206,7 +206,7 @@ void ObjectRegistry::DisposeObject(JDWP::ObjectId id, uint32_t reference_count) } } -void ObjectRegistry::UpdateObjectPointers(RootVisitor visitor, void* arg) { +void ObjectRegistry::UpdateObjectPointers(IsMarkedCallback* callback, void* arg) { MutexLock mu(Thread::Current(), lock_); if (object_to_entry_.empty()) { return; @@ -215,7 +215,7 @@ void ObjectRegistry::UpdateObjectPointers(RootVisitor visitor, void* arg) { for (auto& pair : object_to_entry_) { mirror::Object* new_obj; if (pair.first != nullptr) { - new_obj = visitor(pair.first, arg); + new_obj = callback(pair.first, arg); if (new_obj != nullptr) { new_object_to_entry.insert(std::make_pair(new_obj, pair.second)); } diff --git a/runtime/jdwp/object_registry.h b/runtime/jdwp/object_registry.h index 0190575..3c6cb15 100644 --- a/runtime/jdwp/object_registry.h +++ b/runtime/jdwp/object_registry.h @@ -26,7 +26,7 @@ #include "mirror/class.h" #include "mirror/class-inl.h" #include "mirror/object-inl.h" -#include "root_visitor.h" +#include "object_callbacks.h" #include "safe_map.h" namespace art { @@ -85,7 +85,7 @@ class ObjectRegistry { jobject GetJObject(JDWP::ObjectId id) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Visit, objects are treated as system weaks. - void UpdateObjectPointers(RootVisitor visitor, void* arg) + void UpdateObjectPointers(IsMarkedCallback* callback, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // We have allow / disallow functionality since we use system weak sweeping logic to update moved -- cgit v1.1