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
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index 72220e0..85f3a09 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -1067,13 +1067,13 @@
list_.push_front(m);
}
-void MonitorList::SweepMonitorList(RootVisitor visitor, void* arg) {
+void MonitorList::SweepMonitorList(IsMarkedCallback* callback, void* arg) {
MutexLock mu(Thread::Current(), monitor_list_lock_);
for (auto it = list_.begin(); it != list_.end(); ) {
Monitor* m = *it;
mirror::Object* obj = m->GetObject();
// The object of a monitor can be null if we have deflated it.
- mirror::Object* new_obj = obj != nullptr ? visitor(obj, arg) : nullptr;
+ mirror::Object* new_obj = obj != nullptr ? callback(obj, arg) : nullptr;
if (new_obj == nullptr) {
VLOG(monitor) << "freeing monitor " << m << " belonging to unmarked object "
<< m->GetObject();