Lines Matching refs:to_ref
167 mirror::Object* to_ref = Mark(self, from_ref);
168 if (from_ref != to_ref) {
174 } while (!field->CasWeakRelaxed(from_ref, to_ref));
479 mirror::Object* to_ref = concurrent_copying_->Mark(self, ref);
480 if (to_ref != ref) {
481 *root = to_ref;
496 mirror::Object* to_ref = concurrent_copying_->Mark(self, ref);
497 if (to_ref != ref) {
498 root->Assign(to_ref);
1747 void ConcurrentCopying::PushOntoMarkStack(Thread* const self, mirror::Object* to_ref) {
1749 << " " << to_ref << " " << mirror::Object::PrettyTypeOf(to_ref);
1759 gc_mark_stack_->PushBack(to_ref);
1779 new_tl_mark_stack->PushBack(to_ref);
1786 tl_mark_stack->PushBack(to_ref);
1795 gc_mark_stack_->PushBack(to_ref);
1799 << "ref=" << to_ref
1809 gc_mark_stack_->PushBack(to_ref);
2046 mirror::Object* to_ref = gc_mark_stack_->PopBack();
2047 ProcessMarkStackRef(to_ref);
2089 mirror::Object* to_ref = gc_mark_stack_->PopBack();
2090 ProcessMarkStackRef(to_ref);
2116 mirror::Object* to_ref = p->AsMirrorPtr();
2117 processor(to_ref);
2135 inline void ConcurrentCopying::ProcessMarkStackRef(mirror::Object* to_ref) {
2136 DCHECK(!region_space_->IsInFromSpace(to_ref));
2137 space::RegionSpace::RegionType rtype = region_space_->GetRegionType(to_ref);
2139 DCHECK(to_ref->GetReadBarrierState() == ReadBarrier::GrayState())
2140 << " to_ref=" << to_ref
2141 << " rb_state=" << to_ref->GetReadBarrierState()
2142 << " is_marked=" << IsMarked(to_ref)
2143 << " type=" << to_ref->PrettyTypeOf()
2145 << " space=" << heap_->DumpSpaceNameFromAddress(to_ref)
2153 DCHECK(!region_space_->IsInNewlyAllocatedRegion(to_ref)) << to_ref;
2158 if (!kUseBakerReadBarrier || !region_space_bitmap_->Set(to_ref)) {
2162 CHECK(region_space_->IsLargeObject(to_ref));
2163 region_space_->ZeroLiveBytesForLargeObject(to_ref);
2180 region_space_bitmap_->Set(to_ref);
2185 DCHECK(!region_space_->HasAddress(to_ref)) << to_ref;
2186 DCHECK(!immune_spaces_.ContainsObject(to_ref));
2191 const bool is_los = !mark_bitmap->HasAddress(to_ref);
2193 if (!IsAligned<kPageSize>(to_ref)) {
2201 to_ref,
2205 << "ref=" << to_ref
2209 DCHECK(los_bitmap->HasAddress(to_ref));
2212 perform_scan = !los_bitmap->Set(to_ref);
2216 perform_scan = !mark_bitmap->Set(to_ref);
2224 Scan<true>(to_ref);
2226 Scan<false>(to_ref);
2230 DCHECK(to_ref->GetReadBarrierState() == ReadBarrier::GrayState())
2231 << " to_ref=" << to_ref
2232 << " rb_state=" << to_ref->GetReadBarrierState()
2233 << " is_marked=" << IsMarked(to_ref)
2234 << " type=" << to_ref->PrettyTypeOf()
2236 << " space=" << heap_->DumpSpaceNameFromAddress(to_ref)
2243 if (UNLIKELY((to_ref->GetClass<kVerifyNone, kWithoutReadBarrier>()->IsTypeOfReferenceClass() &&
2244 (referent = to_ref->AsReference()->GetReferent<kWithoutReadBarrier>()) != nullptr &&
2248 DCHECK(to_ref->AsReference()->GetPendingNext() != nullptr)
2249 << "Left unenqueued ref gray " << to_ref;
2256 bool success = to_ref->AtomicSetReadBarrierState<std::memory_order_release>(
2269 DCHECK(region_space_bitmap_->Test(to_ref));
2270 size_t obj_size = to_ref->SizeOf<kDefaultVerifyFlags>();
2272 region_space_->AddLiveBytes(to_ref, alloc_size);
2275 CHECK(to_ref != nullptr);
2277 CHECK(!region_space->IsInFromSpace(to_ref)) << "Scanning object " << to_ref << " in from space";
2278 AssertToSpaceInvariant(nullptr, MemberOffset(0), to_ref);
2280 to_ref->VisitReferences</*kVisitNativeRoots=*/true, kDefaultVerifyFlags, kWithoutReadBarrier>(
3072 inline void ConcurrentCopying::Scan(mirror::Object* to_ref) {
3081 DCHECK(!region_space_->IsInFromSpace(to_ref));
3085 to_ref->VisitReferences</*kVisitNativeRoots=*/true, kDefaultVerifyFlags, kWithoutReadBarrier>(
3099 mirror::Object* to_ref = Mark</*kGrayImmuneObject=*/false, kNoUnEvac, /*kFromGCThread=*/true>(
3104 if (to_ref == ref) {
3109 mirror::Object* new_ref = to_ref;
3132 mirror::Object* to_ref = Mark(self, ref);
3133 if (to_ref == ref) {
3138 mirror::Object* new_ref = to_ref;
3153 mirror::Object* to_ref = Mark<kGrayImmuneObject>(self, ref);
3154 if (to_ref != ref) {
3157 auto new_ref = mirror::CompressedReference<mirror::Object>::FromMirrorPtr(to_ref);
3339 mirror::Object* to_ref = region_space_->AllocNonvirtual</*kForEvac=*/ true>(
3342 if (LIKELY(to_ref != nullptr)) {
3346 to_ref = AllocateInSkippedBlock(self, region_space_alloc_size);
3347 if (to_ref != nullptr) {
3351 region_space_->RecordAlloc(to_ref);
3366 to_ref = heap_->non_moving_space_->Alloc(self, obj_size,
3368 if (UNLIKELY(to_ref == nullptr)) {
3377 DCHECK(to_ref != nullptr);
3380 to_ref->SetClass(klass);
3388 memcpy(reinterpret_cast<uint8_t*>(to_ref) + kObjectHeaderSize,
3399 // the forwarding pointer first. Make the lost copy (to_ref)
3402 FillWithDummyObject(self, to_ref, bytes_allocated);
3404 DCHECK(region_space_->IsInToSpace(to_ref));
3407 region_space_->FreeLarge</*kForEvac=*/ true>(to_ref, bytes_allocated);
3415 reinterpret_cast<uint8_t*>(to_ref)));
3418 DCHECK(heap_->non_moving_space_->HasAddress(to_ref));
3421 heap_->non_moving_space_->Free(self, to_ref);
3425 mirror::Object* lost_fwd_ptr = to_ref;
3426 to_ref = reinterpret_cast<mirror::Object*>(old_lock_word.ForwardingAddress());
3427 CHECK(to_ref != nullptr);
3428 CHECK_NE(to_ref, lost_fwd_ptr);
3429 CHECK(region_space_->IsInToSpace(to_ref) || heap_->non_moving_space_->HasAddress(to_ref))
3430 << "to_ref=" << to_ref << " " << heap_->DumpSpaces();
3431 CHECK_NE(to_ref->GetLockWord(false).GetState(), LockWord::kForwardingAddress);
3432 return to_ref;
3436 to_ref->SetLockWord(old_lock_word, false);
3439 to_ref->SetReadBarrierState(ReadBarrier::GrayState());
3446 LockWord new_lock_word = LockWord::FromForwardingAddress(reinterpret_cast<size_t>(to_ref));
3465 DCHECK(region_space_->IsInToSpace(to_ref));
3467 DCHECK(heap_->non_moving_space_->HasAddress(to_ref));
3471 CHECK(!heap_->non_moving_space_->GetLiveBitmap()->AtomicTestAndSet(to_ref));
3475 CHECK(!heap_->non_moving_space_->GetMarkBitmap()->AtomicTestAndSet(to_ref));
3479 DCHECK(to_ref->GetReadBarrierState() == ReadBarrier::GrayState());
3481 DCHECK(GetFwdPtr(from_ref) == to_ref);
3482 CHECK_NE(to_ref->GetLockWord(false).GetState(), LockWord::kForwardingAddress);
3483 PushOntoMarkStack(self, to_ref);
3484 return to_ref;
3499 mirror::Object* to_ref;
3501 to_ref = GetFwdPtr(from_ref);
3502 DCHECK(to_ref == nullptr || region_space_->IsInToSpace(to_ref) ||
3503 heap_->non_moving_space_->HasAddress(to_ref))
3504 << "from_ref=" << from_ref << " to_ref=" << to_ref;
3507 to_ref = from_ref;
3509 to_ref = nullptr;
3518 to_ref = from_ref;
3523 to_ref = from_ref;
3525 to_ref = nullptr;
3529 return to_ref;
3543 // ref is in a non-moving space (from_ref == to_ref).
3694 mirror::Object* to_ref = IsMarked(from_ref);
3695 if (to_ref == nullptr) {
3698 if (from_ref != to_ref) {
3705 } while (!field->CasWeakRelaxed(from_ref, to_ref));
3708 field->Assign</* kIsVolatile= */ true>(to_ref);