OSDN Git Service

Add more logging for checking in to-space for CC copy
authorMathieu Chartier <mathieuc@google.com>
Tue, 13 Sep 2016 17:02:48 +0000 (10:02 -0700)
committerMathieu Chartier <mathieuc@google.com>
Tue, 13 Sep 2016 18:07:19 +0000 (11:07 -0700)
Trying to debug occasionally failing CHECK.

Bug: 31423258

Test: test-art-host CC baker

Change-Id: I00963eb4f529811090e485184bb48a28287e77d3

runtime/gc/collector/concurrent_copying.cc

index 975ac36..e534369 100644 (file)
@@ -2087,7 +2087,8 @@ mirror::Object* ConcurrentCopying::Copy(mirror::Object* from_ref) {
       to_ref = reinterpret_cast<mirror::Object*>(old_lock_word.ForwardingAddress());
       CHECK(to_ref != nullptr);
       CHECK_NE(to_ref, lost_fwd_ptr);
-      CHECK(region_space_->IsInToSpace(to_ref) || heap_->non_moving_space_->HasAddress(to_ref));
+      CHECK(region_space_->IsInToSpace(to_ref) || heap_->non_moving_space_->HasAddress(to_ref))
+          << "to_ref=" << to_ref << " " << heap_->DumpSpaces();
       CHECK_NE(to_ref->GetLockWord(false).GetState(), LockWord::kForwardingAddress);
       return to_ref;
     }