diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-01-28 14:50:23 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-02-11 10:40:10 -0800 |
commit | 83c8ee000d525017ead8753fce6bc1020249b96a (patch) | |
tree | d5167ed15dee2629905ac3640b6ea0578d4ae312 /runtime/jdwp | |
parent | 7cba217ab0661d74deccbb97160cdf60b74d4ea3 (diff) | |
download | art-83c8ee000d525017ead8753fce6bc1020249b96a.zip art-83c8ee000d525017ead8753fce6bc1020249b96a.tar.gz art-83c8ee000d525017ead8753fce6bc1020249b96a.tar.bz2 |
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
Diffstat (limited to 'runtime/jdwp')
-rw-r--r-- | runtime/jdwp/object_registry.cc | 4 | ||||
-rw-r--r-- | runtime/jdwp/object_registry.h | 4 |
2 files changed, 4 insertions, 4 deletions
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 |