| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index b4fafec10939aea23ddd4bc2aada41fee52eced9..1e50fab3f9f994827caab898a6fa8720bd7a1f9f 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -2103,6 +2103,7 @@ void MarkCompactCollector::EmptyMarkingDeque() {
|
| // overflowed objects in the heap so the overflow flag on the markings stack
|
| // is cleared.
|
| void MarkCompactCollector::RefillMarkingDeque() {
|
| + isolate()->CountUsage(v8::Isolate::UseCounterFeature::kMarkDequeOverflow);
|
| DCHECK(marking_deque_.overflowed());
|
|
|
| DiscoverGreyObjectsInNewSpace(heap(), &marking_deque_);
|
| @@ -4664,6 +4665,30 @@ void MarkCompactCollector::RecordRelocSlot(RelocInfo* rinfo, Object* target) {
|
| }
|
|
|
|
|
| +void MarkCompactCollector::EvictEvacuationCandidate(Page* page) {
|
| + if (FLAG_trace_fragmentation) {
|
| + PrintF("Page %p is too popular. Disabling evacuation.\n",
|
| + reinterpret_cast<void*>(page));
|
| + }
|
| +
|
| + isolate()->CountUsage(v8::Isolate::UseCounterFeature::kSlotsBufferOverflow);
|
| +
|
| + // TODO(gc) If all evacuation candidates are too popular we
|
| + // should stop slots recording entirely.
|
| + page->ClearEvacuationCandidate();
|
| +
|
| + // We were not collecting slots on this page that point
|
| + // to other evacuation candidates thus we have to
|
| + // rescan the page after evacuation to discover and update all
|
| + // pointers to evacuated objects.
|
| + if (page->owner()->identity() == OLD_DATA_SPACE) {
|
| + evacuation_candidates_.RemoveElement(page);
|
| + } else {
|
| + page->SetFlag(Page::RESCAN_ON_EVACUATION);
|
| + }
|
| +}
|
| +
|
| +
|
| void MarkCompactCollector::RecordCodeEntrySlot(Address slot, Code* target) {
|
| Page* target_page = Page::FromAddress(reinterpret_cast<Address>(target));
|
| if (target_page->IsEvacuationCandidate() &&
|
|
|