summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2018-08-21 16:47:16 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-08-21 16:47:16 +0000
commitc69199570ed834c99e36cf56fdc10e960b13236d (patch)
tree5d6016aa879021b35333792cef9e21cbfafd6244
parent9c924258dd3764af816bec48a5a609f796d2b6b2 (diff)
parent5c54d8643802d5fb4764049a6aa7e500d1c9998e (diff)
Merge "Restore bitmap marking in non-moving space in ConcurrentCopying::Copy."
-rw-r--r--runtime/gc/collector/concurrent_copying.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc
index b1dfd32f0a..2955b805c1 100644
--- a/runtime/gc/collector/concurrent_copying.cc
+++ b/runtime/gc/collector/concurrent_copying.cc
@@ -2199,9 +2199,6 @@ void ConcurrentCopying::AssertToSpaceInvariantInNonMovingSpace(mirror::Object* o
(is_los && los_bitmap->Test(ref))) {
// OK.
} else {
- /* FIXME: We've seen this assertion fail in 004-ThreadStress from
- time to time with Sticky-Bit (Generational) CC (it seems the
- reference was in the non-moving space range at every occurrence). */
// If `ref` is on the allocation stack, then it may not be
// marked live, but considered marked/alive (but not
// necessarily on the live stack).
@@ -2562,9 +2559,8 @@ mirror::Object* ConcurrentCopying::Copy(Thread* const self,
accounting::ContinuousSpaceBitmap* mark_bitmap =
heap_mark_bitmap_->GetContinuousSpaceBitmap(to_ref);
CHECK(mark_bitmap != nullptr);
- if (!kEnableGenerationalConcurrentCopyingCollection) {
- CHECK(!mark_bitmap->AtomicTestAndSet(to_ref));
- }
+ bool previously_marked_in_bitmap = mark_bitmap->AtomicTestAndSet(to_ref);
+ CHECK(!previously_marked_in_bitmap);
}
}
DCHECK(to_ref != nullptr);