Index: src/heap/spaces-inl.h |
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h |
index 3ec2db51abde463061202c41d134f127dbc3c93d..3c5c99af9491852d8c92f187aae3c1d288b8515f 100644 |
--- a/src/heap/spaces-inl.h |
+++ b/src/heap/spaces-inl.h |
@@ -182,7 +182,7 @@ Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable, |
page->AllocateLocalTracker(); |
if (FLAG_minor_mc) { |
page->AllocateYoungGenerationBitmap(); |
- page->ClearLiveness<MarkingMode::YOUNG_GENERATION>(); |
+ MarkingState::External(page).ClearLiveness(); |
} |
return page; |
} |
@@ -230,54 +230,6 @@ void Page::InitializeFreeListCategories() { |
} |
} |
-template <MarkingMode mode> |
-void MemoryChunk::IncrementLiveBytes(HeapObject* object, int by) { |
- MemoryChunk::FromAddress(object->address())->IncrementLiveBytes<mode>(by); |
-} |
- |
-template <MarkingMode mode> |
-void MemoryChunk::TraceLiveBytes(intptr_t old_value, intptr_t new_value) { |
- if (!FLAG_trace_live_bytes) return; |
- PrintIsolate(heap()->isolate(), |
- "live-bytes[%p:%s]: %" V8PRIdPTR "-> %" V8PRIdPTR "\n", |
- static_cast<void*>(this), |
- mode == MarkingMode::FULL ? "internal" : "external", old_value, |
- new_value); |
-} |
- |
-template <MarkingMode mode> |
-void MemoryChunk::ResetLiveBytes() { |
- switch (mode) { |
- case MarkingMode::FULL: |
- TraceLiveBytes(live_byte_count_, 0); |
- live_byte_count_ = 0; |
- break; |
- case MarkingMode::YOUNG_GENERATION: |
- TraceLiveBytes(young_generation_live_byte_count_, 0); |
- young_generation_live_byte_count_ = 0; |
- break; |
- } |
-} |
- |
-template <MarkingMode mode> |
-void MemoryChunk::IncrementLiveBytes(int by) { |
- switch (mode) { |
- case MarkingMode::FULL: |
- TraceLiveBytes(live_byte_count_, live_byte_count_ + by); |
- live_byte_count_ += by; |
- DCHECK_GE(live_byte_count_, 0); |
- DCHECK_LE(static_cast<size_t>(live_byte_count_), size_); |
- break; |
- case MarkingMode::YOUNG_GENERATION: |
- TraceLiveBytes(young_generation_live_byte_count_, |
- young_generation_live_byte_count_ + by); |
- young_generation_live_byte_count_ += by; |
- DCHECK_GE(young_generation_live_byte_count_, 0); |
- DCHECK_LE(static_cast<size_t>(young_generation_live_byte_count_), size_); |
- break; |
- } |
-} |
- |
bool PagedSpace::Contains(Address addr) { |
return MemoryChunk::FromAnyPointerAddress(heap(), addr)->owner() == this; |
} |