summaryrefslogtreecommitdiff
path: root/runtime/gc/reference_queue.h
diff options
context:
space:
mode:
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
commit83c8ee000d525017ead8753fce6bc1020249b96a (patch)
treed5167ed15dee2629905ac3640b6ea0578d4ae312 /runtime/gc/reference_queue.h
parent7cba217ab0661d74deccbb97160cdf60b74d4ea3 (diff)
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/gc/reference_queue.h')
-rw-r--r--runtime/gc/reference_queue.h11
1 files changed, 6 insertions, 5 deletions
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_);