diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-02-26 19:15:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-02-26 19:15:05 +0000 |
commit | 930f7b843ddc6e6530439d3fdb0e2133a6292f1e (patch) | |
tree | 19aab2c810b069df6c7ece3fe341dcde222c9a5b /runtime/gc/collector/mark_sweep.cc | |
parent | d5846e4b9d654c2a31e4affa3c22c835d2f5e2d6 (diff) | |
parent | 9d04a20bde1b1855cefc64aebc1a44e253b1a13b (diff) | |
download | art-930f7b843ddc6e6530439d3fdb0e2133a6292f1e.zip art-930f7b843ddc6e6530439d3fdb0e2133a6292f1e.tar.gz art-930f7b843ddc6e6530439d3fdb0e2133a6292f1e.tar.bz2 |
Merge "(Experimental) Add Brooks pointers."
Diffstat (limited to 'runtime/gc/collector/mark_sweep.cc')
-rw-r--r-- | runtime/gc/collector/mark_sweep.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc index 8ca3892..7b2bc3b 100644 --- a/runtime/gc/collector/mark_sweep.cc +++ b/runtime/gc/collector/mark_sweep.cc @@ -450,6 +450,12 @@ mirror::Object* MarkSweep::MarkObjectCallback(mirror::Object* obj, void* arg) { inline void MarkSweep::UnMarkObjectNonNull(const Object* obj) { DCHECK(!IsImmune(obj)); + + if (kUseBrooksPointer) { + // Verify all the objects have the correct Brooks pointer installed. + obj->AssertSelfBrooksPointer(); + } + // Try to take advantage of locality of references within a space, failing this find the space // the hard way. accounting::SpaceBitmap* object_bitmap = current_mark_bitmap_; @@ -470,6 +476,11 @@ inline void MarkSweep::UnMarkObjectNonNull(const Object* obj) { inline void MarkSweep::MarkObjectNonNull(const Object* obj) { DCHECK(obj != NULL); + if (kUseBrooksPointer) { + // Verify all the objects have the correct Brooks pointer installed. + obj->AssertSelfBrooksPointer(); + } + if (IsImmune(obj)) { DCHECK(IsMarked(obj)); return; @@ -532,6 +543,11 @@ bool MarkSweep::MarkLargeObject(const Object* obj, bool set) { inline bool MarkSweep::MarkObjectParallel(const Object* obj) { DCHECK(obj != NULL); + if (kUseBrooksPointer) { + // Verify all the objects have the correct Brooks pointer installed. + obj->AssertSelfBrooksPointer(); + } + if (IsImmune(obj)) { DCHECK(IsMarked(obj)); return false; |