Commit e94850ea authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] Remove left-overs of RESCAN_ON_EVACUATION flag.

The code actually setting this flag has already been removed. This CL merely
removes dead code.

BUG=

Review URL: https://codereview.chromium.org/1788753002

Cr-Commit-Position: refs/heads/master@{#34729}
parent b154e480
...@@ -779,7 +779,6 @@ void MarkCompactCollector::AbortCompaction() { ...@@ -779,7 +779,6 @@ void MarkCompactCollector::AbortCompaction() {
RememberedSet<OLD_TO_OLD>::ClearAll(heap()); RememberedSet<OLD_TO_OLD>::ClearAll(heap());
for (Page* p : evacuation_candidates_) { for (Page* p : evacuation_candidates_) {
p->ClearEvacuationCandidate(); p->ClearEvacuationCandidate();
p->ClearFlag(MemoryChunk::RESCAN_ON_EVACUATION);
} }
compacting_ = false; compacting_ = false;
evacuation_candidates_.Rewind(0); evacuation_candidates_.Rewind(0);
...@@ -3023,8 +3022,7 @@ bool MarkCompactCollector::Evacuator::EvacuatePage(MemoryChunk* chunk) { ...@@ -3023,8 +3022,7 @@ bool MarkCompactCollector::Evacuator::EvacuatePage(MemoryChunk* chunk) {
DCHECK(success); DCHECK(success);
USE(success); USE(success);
} else { } else {
DCHECK(chunk->IsEvacuationCandidate() || DCHECK(chunk->IsEvacuationCandidate());
chunk->IsFlagSet(MemoryChunk::RESCAN_ON_EVACUATION));
DCHECK_EQ(chunk->concurrent_sweeping_state().Value(), Page::kSweepingDone); DCHECK_EQ(chunk->concurrent_sweeping_state().Value(), Page::kSweepingDone);
success = EvacuateSinglePage(chunk, &old_space_visitor_); success = EvacuateSinglePage(chunk, &old_space_visitor_);
} }
...@@ -3580,53 +3578,17 @@ void MarkCompactCollector::UpdatePointersAfterEvacuation() { ...@@ -3580,53 +3578,17 @@ void MarkCompactCollector::UpdatePointersAfterEvacuation() {
heap()->tracer(), heap()->tracer(),
GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_BETWEEN_EVACUATED); GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_BETWEEN_EVACUATED);
for (Page* p : evacuation_candidates_) { for (Page* p : evacuation_candidates_) {
DCHECK(p->IsEvacuationCandidate() || DCHECK(p->IsEvacuationCandidate());
p->IsFlagSet(Page::RESCAN_ON_EVACUATION)); // Important: skip list should be cleared only after roots were updated
// because root iteration traverses the stack and might have to find
if (p->IsEvacuationCandidate()) { // code objects from non-updated pc pointing into evacuation candidate.
// Important: skip list should be cleared only after roots were updated SkipList* list = p->skip_list();
// because root iteration traverses the stack and might have to find if (list != NULL) list->Clear();
// code objects from non-updated pc pointing into evacuation candidate.
SkipList* list = p->skip_list(); // First pass on aborted pages, fixing up all live objects.
if (list != NULL) list->Clear(); if (p->IsFlagSet(Page::COMPACTION_WAS_ABORTED)) {
p->ClearEvacuationCandidate();
// First pass on aborted pages, fixing up all live objects. VisitLiveObjectsBody(p, &updating_visitor);
if (p->IsFlagSet(Page::COMPACTION_WAS_ABORTED)) {
p->ClearEvacuationCandidate();
VisitLiveObjectsBody(p, &updating_visitor);
}
}
if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) {
if (FLAG_gc_verbose) {
PrintF("Sweeping 0x%" V8PRIxPTR " during evacuation.\n",
reinterpret_cast<intptr_t>(p));
}
PagedSpace* space = static_cast<PagedSpace*>(p->owner());
p->ClearFlag(MemoryChunk::RESCAN_ON_EVACUATION);
p->concurrent_sweeping_state().SetValue(Page::kSweepingInProgress);
switch (space->identity()) {
case OLD_SPACE:
Sweep<SWEEP_AND_VISIT_LIVE_OBJECTS, SWEEP_ON_MAIN_THREAD,
IGNORE_SKIP_LIST, IGNORE_FREE_SPACE>(space, NULL, p,
&updating_visitor);
break;
case CODE_SPACE:
if (FLAG_zap_code_space) {
Sweep<SWEEP_AND_VISIT_LIVE_OBJECTS, SWEEP_ON_MAIN_THREAD,
REBUILD_SKIP_LIST, ZAP_FREE_SPACE>(space, NULL, p,
&updating_visitor);
} else {
Sweep<SWEEP_AND_VISIT_LIVE_OBJECTS, SWEEP_ON_MAIN_THREAD,
REBUILD_SKIP_LIST, IGNORE_FREE_SPACE>(space, NULL, p,
&updating_visitor);
}
break;
default:
UNREACHABLE();
break;
}
} }
} }
} }
...@@ -3730,8 +3692,7 @@ void MarkCompactCollector::StartSweepSpace(PagedSpace* space) { ...@@ -3730,8 +3692,7 @@ void MarkCompactCollector::StartSweepSpace(PagedSpace* space) {
Page* p = it.next(); Page* p = it.next();
DCHECK(p->SweepingDone()); DCHECK(p->SweepingDone());
if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION) || if (p->IsEvacuationCandidate()) {
p->IsEvacuationCandidate()) {
// Will be processed in EvacuateNewSpaceAndCandidates. // Will be processed in EvacuateNewSpaceAndCandidates.
DCHECK(evacuation_candidates_.length() > 0); DCHECK(evacuation_candidates_.length() > 0);
continue; continue;
......
...@@ -300,7 +300,6 @@ class MemoryChunk { ...@@ -300,7 +300,6 @@ class MemoryChunk {
IN_TO_SPACE, // All pages in new space has one of these two set. IN_TO_SPACE, // All pages in new space has one of these two set.
NEW_SPACE_BELOW_AGE_MARK, NEW_SPACE_BELOW_AGE_MARK,
EVACUATION_CANDIDATE, EVACUATION_CANDIDATE,
RESCAN_ON_EVACUATION,
NEVER_EVACUATE, // May contain immortal immutables. NEVER_EVACUATE, // May contain immortal immutables.
// Large objects can have a progress bar in their page header. These object // Large objects can have a progress bar in their page header. These object
...@@ -355,8 +354,7 @@ class MemoryChunk { ...@@ -355,8 +354,7 @@ class MemoryChunk {
static const int kEvacuationCandidateMask = 1 << EVACUATION_CANDIDATE; static const int kEvacuationCandidateMask = 1 << EVACUATION_CANDIDATE;
static const int kSkipEvacuationSlotsRecordingMask = static const int kSkipEvacuationSlotsRecordingMask =
(1 << EVACUATION_CANDIDATE) | (1 << RESCAN_ON_EVACUATION) | (1 << EVACUATION_CANDIDATE) | (1 << IN_FROM_SPACE) | (1 << IN_TO_SPACE);
(1 << IN_FROM_SPACE) | (1 << IN_TO_SPACE);
static const intptr_t kAlignment = static const intptr_t kAlignment =
(static_cast<uintptr_t>(1) << kPageSizeBits); (static_cast<uintptr_t>(1) << kPageSizeBits);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment