summaryrefslogtreecommitdiffstats
path: root/runtime/gc/reference_queue.h
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-06-15 12:39:02 -0700
committerMathieu Chartier <mathieuc@google.com>2014-06-16 14:01:52 -0700
commit308351ada0008b0cbe1a5afc31c302c975554ee4 (patch)
tree1447c36df5616515d6e7ac35c185721d3c829c4b /runtime/gc/reference_queue.h
parent97ed29f800c56a06fd6989e0883e4c97bedd2453 (diff)
downloadart-308351ada0008b0cbe1a5afc31c302c975554ee4.tar.gz
art-308351ada0008b0cbe1a5afc31c302c975554ee4.tar.bz2
art-308351ada0008b0cbe1a5afc31c302c975554ee4.zip
Change reference processing to use heap references.
Removes several SetReferents for updating moved referents. Cleaned up other aspects of the code. Change-Id: Ibcb4d713fadea617efee7e936352ddf77ff4c370
Diffstat (limited to 'runtime/gc/reference_queue.h')
-rw-r--r--runtime/gc/reference_queue.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/runtime/gc/reference_queue.h b/runtime/gc/reference_queue.h
index 1d8cc1aefd..8ef0d20925 100644
--- a/runtime/gc/reference_queue.h
+++ b/runtime/gc/reference_queue.h
@@ -58,23 +58,22 @@ class ReferenceQueue {
mirror::Reference* DequeuePendingReference() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// 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,
- IsMarkedCallback* is_marked_callback,
+ void EnqueueFinalizerReferences(ReferenceQueue* cleared_references,
+ IsHeapReferenceMarkedCallback* is_marked_callback,
MarkObjectCallback* mark_object_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 ForwardSoftReferences(IsMarkedCallback* preserve_callback, void* arg)
+ void ForwardSoftReferences(IsHeapReferenceMarkedCallback* 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,
- IsMarkedCallback* is_marked_callback,
- void* arg)
+ void ClearWhiteReferences(ReferenceQueue* cleared_references,
+ IsHeapReferenceMarkedCallback* is_marked_callback, void* arg)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void Dump(std::ostream& os) const
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
bool IsEmpty() const {
return list_ == nullptr;
}