Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: src/heap/mark-compact.cc

Issue 2209193002: [heap] Remove unused MarkCompactCollector::VisitLiveObjectsBody. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/mark-compact.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/mark-compact.h" 5 #include "src/heap/mark-compact.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3504 matching lines...) Expand 10 before | Expand all | Expand 10 after
3515 void MarkCompactCollector::RecomputeLiveBytes(MemoryChunk* page) { 3515 void MarkCompactCollector::RecomputeLiveBytes(MemoryChunk* page) {
3516 LiveObjectIterator<kBlackObjects> it(page); 3516 LiveObjectIterator<kBlackObjects> it(page);
3517 int new_live_size = 0; 3517 int new_live_size = 0;
3518 HeapObject* object = nullptr; 3518 HeapObject* object = nullptr;
3519 while ((object = it.Next()) != nullptr) { 3519 while ((object = it.Next()) != nullptr) {
3520 new_live_size += object->Size(); 3520 new_live_size += object->Size();
3521 } 3521 }
3522 page->SetLiveBytes(new_live_size); 3522 page->SetLiveBytes(new_live_size);
3523 } 3523 }
3524 3524
3525
3526 void MarkCompactCollector::VisitLiveObjectsBody(Page* page,
3527 ObjectVisitor* visitor) {
3528 #ifdef VERIFY_HEAP
3529 VerifyAllBlackObjects(page);
3530 #endif // VERIFY_HEAP
3531
3532 LiveObjectIterator<kBlackObjects> it(page);
3533 HeapObject* object = NULL;
3534 while ((object = it.Next()) != NULL) {
3535 DCHECK(Marking::IsBlack(ObjectMarking::MarkBitFrom(object)));
3536 Map* map = object->synchronized_map();
3537 int size = object->SizeFromMap(map);
3538 object->IterateBody(map->instance_type(), size, visitor);
3539 }
3540 }
3541
3542 void MarkCompactCollector::Sweeper::AddSweptPageSafe(PagedSpace* space, 3525 void MarkCompactCollector::Sweeper::AddSweptPageSafe(PagedSpace* space,
3543 Page* page) { 3526 Page* page) {
3544 base::LockGuard<base::Mutex> guard(&mutex_); 3527 base::LockGuard<base::Mutex> guard(&mutex_);
3545 swept_list_[space->identity()].Add(page); 3528 swept_list_[space->identity()].Add(page);
3546 } 3529 }
3547 3530
3548 void MarkCompactCollector::EvacuateNewSpaceAndCandidates() { 3531 void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
3549 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE); 3532 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE);
3550 Heap::RelocationLock relocation_lock(heap()); 3533 Heap::RelocationLock relocation_lock(heap());
3551 3534
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
4038 // The target is always in old space, we don't have to record the slot in 4021 // The target is always in old space, we don't have to record the slot in
4039 // the old-to-new remembered set. 4022 // the old-to-new remembered set.
4040 DCHECK(!heap()->InNewSpace(target)); 4023 DCHECK(!heap()->InNewSpace(target));
4041 RecordRelocSlot(host, &rinfo, target); 4024 RecordRelocSlot(host, &rinfo, target);
4042 } 4025 }
4043 } 4026 }
4044 } 4027 }
4045 4028
4046 } // namespace internal 4029 } // namespace internal
4047 } // namespace v8 4030 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/mark-compact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698