diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-04-02 17:32:54 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-04-03 20:16:44 -0700 |
commit | 800ac2defde5d12b2f1f313c6b6162560cfa6fc7 (patch) | |
tree | c25e10b68be9be9949e96d3c977fbcf906f22a3a /runtime/gc | |
parent | 5cff3083c00dfbae7b8c5c34b0bedbc514c91df9 (diff) | |
download | art-800ac2defde5d12b2f1f313c6b6162560cfa6fc7.zip art-800ac2defde5d12b2f1f313c6b6162560cfa6fc7.tar.gz art-800ac2defde5d12b2f1f313c6b6162560cfa6fc7.tar.bz2 |
Insert an empty read barrier call.
Bug: 12687968
Change-Id: Ie1d28658e16e09f6a983cb5c1f0d5b375b7ae069
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/space/space_test.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/gc/space/space_test.h b/runtime/gc/space/space_test.h index 5c735df..9896a48 100644 --- a/runtime/gc/space/space_test.h +++ b/runtime/gc/space/space_test.h @@ -85,8 +85,13 @@ class SpaceTest : public CommonRuntimeTest { EXPECT_GE(size, SizeOfZeroLengthByteArray()); EXPECT_TRUE(byte_array_class != nullptr); o->SetClass(byte_array_class); - if (kUseBrooksReadBarrier) { - o->SetReadBarrierPointer(o); + if (kUseBakerOrBrooksReadBarrier) { + // Like the proper heap object allocation, install and verify + // the correct read barrier pointer. + if (kUseBrooksReadBarrier) { + o->SetReadBarrierPointer(o); + } + o->AssertReadBarrierPointer(); } mirror::Array* arr = o->AsArray<kVerifyNone>(); size_t header_size = SizeOfZeroLengthByteArray(); |