diff options
| author | 2018-08-22 10:52:34 +0000 | |
|---|---|---|
| committer | 2018-08-22 10:52:34 +0000 | |
| commit | 37d9295e99cb26fb79c46f28e874579478731d84 (patch) | |
| tree | a8b1ddb0ad271a5e6531bfeb233b79e4843be78d | |
| parent | 3d41fe4655a1f46f205f3f872c6ba88f7f10b92d (diff) | |
| parent | ade74a610f4f7e6e243234530cd0743bef6c00a2 (diff) | |
Merge "Add a check to ConcurrentCopying::MarkNonMoving for sticky-bit case."
| -rw-r--r-- | runtime/gc/collector/concurrent_copying.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc index 29e30f88ae..a9ba54a4ff 100644 --- a/runtime/gc/collector/concurrent_copying.cc +++ b/runtime/gc/collector/concurrent_copying.cc @@ -2890,10 +2890,12 @@ mirror::Object* ConcurrentCopying::MarkNonMoving(Thread* const self, heap_mark_bitmap_->GetLargeObjectBitmap(ref); bool is_los = mark_bitmap == nullptr; if (kEnableGenerationalConcurrentCopyingCollection && young_gen_) { + // The sticky-bit CC collector is only compatible with Baker-style read barriers. + DCHECK(kUseBakerReadBarrier); // Not done scanning, use AtomicSetReadBarrierPointer. if (!done_scanning_) { // Since the mark bitmap is still filled in from last GC, we can not use that or else the - // mutator may see references to the from space. Instead, use the baker pointer itself as + // mutator may see references to the from space. Instead, use the Baker pointer itself as // the mark bit. if (ref->AtomicSetReadBarrierState(ReadBarrier::NonGrayState(), ReadBarrier::GrayState())) { // TODO: We don't actually need to scan this object later, we just need to clear the gray |