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/gc/reference_queue.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'runtime/gc/reference_queue.h') diff --git a/runtime/gc/reference_queue.h b/runtime/gc/reference_queue.h index 3f3069edc2..e12a95f332 100644 --- a/runtime/gc/reference_queue.h +++ b/runtime/gc/reference_queue.h @@ -27,8 +27,8 @@ #include "gtest/gtest.h" #include "jni.h" #include "locks.h" +#include "object_callbacks.h" #include "offsets.h" -#include "root_visitor.h" #include "thread_pool.h" namespace art { @@ -56,17 +56,18 @@ class ReferenceQueue { // Enqueues finalizer references with white referents. White referents are blackened, moved to the // zombie field, and the referent field is cleared. void EnqueueFinalizerReferences(ReferenceQueue& cleared_references, - RootVisitor is_marked_callback, - RootVisitor recursive_mark_callback, void* arg) + IsMarkedCallback is_marked_callback, + MarkObjectCallback recursive_mark_callback, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Walks the reference list marking any references subject to the reference clearing policy. // References with a black referent are removed from the list. References with white referents // biased toward saving are blackened and also removed from the list. - void PreserveSomeSoftReferences(RootVisitor preserve_callback, void* arg) + void PreserveSomeSoftReferences(IsMarkedCallback* preserve_callback, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Unlink the reference list clearing references objects with white referents. Cleared references // registered to a reference queue are scheduled for appending by the heap worker thread. - void ClearWhiteReferences(ReferenceQueue& cleared_references, RootVisitor visitor, void* arg) + void ClearWhiteReferences(ReferenceQueue& cleared_references, IsMarkedCallback is_marked_callback, + void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); void Dump(std::ostream& os) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); -- cgit v1.2.3-59-g8ed1b