diff options
| author | 2016-08-03 18:51:34 -0700 | |
|---|---|---|
| committer | 2016-08-03 19:44:10 -0700 | |
| commit | d6a595baf0f389a7eb29fa3d94390c18a29c28da (patch) | |
| tree | 573ff358268737523f47f3cc3f6fcba42d1b4d0c | |
| parent | 2c6cd5b9b906fc97b383eb6f7bbc5b7d4da9596d (diff) | |
Fix CC table lookup tests
Only set the mark bits for baker barrier, not sure why this
doesn't work for table lookup barrier yet.
Bug: 30162165
Test: test-art-host with CC table lookup
Change-Id: I4309ac22bfc0f8a5c9bf081365e3e38da43eee30
| -rw-r--r-- | runtime/gc/collector/concurrent_copying-inl.h | 3 | ||||
| -rw-r--r-- | runtime/mirror/object-inl.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/collector/concurrent_copying-inl.h b/runtime/gc/collector/concurrent_copying-inl.h index 1a7cb36d65..fb774a4d1e 100644 --- a/runtime/gc/collector/concurrent_copying-inl.h +++ b/runtime/gc/collector/concurrent_copying-inl.h @@ -166,7 +166,8 @@ inline mirror::Object* ConcurrentCopying::MarkFromReadBarrier(mirror::Object* fr } else { ret = Mark(from_ref); } - if (LIKELY(!rb_mark_bit_stack_full_ && ret->AtomicSetMarkBit(0, 1))) { + // Only set the mark bit for baker barrier. + if (kUseBakerReadBarrier && LIKELY(!rb_mark_bit_stack_full_ && ret->AtomicSetMarkBit(0, 1))) { // If the mark stack is full, we may temporarily go to mark and back to unmarked. Seeing both // values are OK since the only race is doing an unnecessary Mark. if (!rb_mark_bit_stack_->AtomicPushBack(ret)) { diff --git a/runtime/mirror/object-inl.h b/runtime/mirror/object-inl.h index 061bee1ad9..0495c957c6 100644 --- a/runtime/mirror/object-inl.h +++ b/runtime/mirror/object-inl.h @@ -149,7 +149,6 @@ inline Object* Object::GetReadBarrierPointer() { inline uint32_t Object::GetMarkBit() { #ifdef USE_READ_BARRIER - DCHECK(kUseBakerReadBarrier); return GetLockWord(false).MarkBitState(); #else LOG(FATAL) << "Unreachable"; |