summaryrefslogtreecommitdiffstats
path: root/runtime/gc/reference_processor.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_processor.h
parent97ed29f800c56a06fd6989e0883e4c97bedd2453 (diff)
downloadandroid_art-308351ada0008b0cbe1a5afc31c302c975554ee4.tar.gz
android_art-308351ada0008b0cbe1a5afc31c302c975554ee4.tar.bz2
android_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_processor.h')
-rw-r--r--runtime/gc/reference_processor.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/gc/reference_processor.h b/runtime/gc/reference_processor.h
index f082a9ec66..ff7da52bdf 100644
--- a/runtime/gc/reference_processor.h
+++ b/runtime/gc/reference_processor.h
@@ -40,9 +40,10 @@ class Heap;
class ReferenceProcessor {
public:
explicit ReferenceProcessor();
- static mirror::Object* PreserveSoftReferenceCallback(mirror::Object* obj, void* arg);
+ static bool PreserveSoftReferenceCallback(mirror::HeapReference<mirror::Object>* obj, void* arg)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void ProcessReferences(bool concurrent, TimingLogger* timings, bool clear_soft_references,
- IsMarkedCallback* is_marked_callback,
+ IsHeapReferenceMarkedCallback* is_marked_callback,
MarkObjectCallback* mark_object_callback,
ProcessMarkStackCallback* process_mark_stack_callback, void* arg)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
@@ -54,21 +55,21 @@ class ReferenceProcessor {
// Decode the referent, may block if references are being processed.
mirror::Object* GetReferent(Thread* self, mirror::Reference* reference)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(lock_);
- void EnqueueClearedReferences() LOCKS_EXCLUDED(Locks::mutator_lock_);
+ void EnqueueClearedReferences(Thread* self) LOCKS_EXCLUDED(Locks::mutator_lock_);
void DelayReferenceReferent(mirror::Class* klass, mirror::Reference* ref,
- IsMarkedCallback is_marked_callback, void* arg)
+ IsHeapReferenceMarkedCallback* is_marked_callback, void* arg)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
private:
class ProcessReferencesArgs {
public:
- ProcessReferencesArgs(IsMarkedCallback* is_marked_callback,
+ ProcessReferencesArgs(IsHeapReferenceMarkedCallback* is_marked_callback,
MarkObjectCallback* mark_callback, void* arg)
: is_marked_callback_(is_marked_callback), mark_callback_(mark_callback), arg_(arg) {
}
// The is marked callback is null when the args aren't set up.
- IsMarkedCallback* is_marked_callback_;
+ IsHeapReferenceMarkedCallback* is_marked_callback_;
MarkObjectCallback* mark_callback_;
void* arg_;
};