diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-01-31 13:35:49 -0800 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-02-25 13:56:48 -0800 |
commit | 9d04a20bde1b1855cefc64aebc1a44e253b1a13b (patch) | |
tree | 85b8315677c3d6545ac6c8b27db7cb00b82e68b7 /runtime/gc/heap-inl.h | |
parent | 0f8aa6b38f204ccacd3ac12bb844e628cec2215b (diff) | |
download | art-9d04a20bde1b1855cefc64aebc1a44e253b1a13b.zip art-9d04a20bde1b1855cefc64aebc1a44e253b1a13b.tar.gz art-9d04a20bde1b1855cefc64aebc1a44e253b1a13b.tar.bz2 |
(Experimental) Add Brooks pointers.
This feature is disabled by default.
Verified that the Brooks pointers are installed correctly by using the
CMS/SS collectors.
Change-Id: Ia9be9814ab6e29169ac85edc4792ce8c81d552a9
Diffstat (limited to 'runtime/gc/heap-inl.h')
-rw-r--r-- | runtime/gc/heap-inl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/gc/heap-inl.h b/runtime/gc/heap-inl.h index 3d591f0..2e47a02 100644 --- a/runtime/gc/heap-inl.h +++ b/runtime/gc/heap-inl.h @@ -65,6 +65,10 @@ inline mirror::Object* Heap::AllocObjectWithAllocator(Thread* self, mirror::Clas } } obj->SetClass(klass); + if (kUseBrooksPointer) { + obj->SetBrooksPointer(obj); + obj->AssertSelfBrooksPointer(); + } pre_fence_visitor(obj); DCHECK_GT(bytes_allocated, 0u); const size_t new_num_bytes_allocated = |