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

Unified Diff: src/heap/mark-compact.cc

Issue 905773004: Mark pages created during bootstrapping as never-evacuate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: like this? Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index e4e525883d50eec5ad3095f88b8ad3000893d580..de0b0af5c2fb144b155adb0f074d00b2bd7bee73 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -242,6 +242,7 @@ void MarkCompactCollector::TearDown() {
void MarkCompactCollector::AddEvacuationCandidate(Page* p) {
+ DCHECK(!p->NeverEvacuate());
p->MarkEvacuationCandidate();
evacuation_candidates_.Add(p);
}
@@ -719,10 +720,9 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) {
Candidate* least = NULL;
PageIterator it(space);
- if (it.has_next()) it.next(); // Never compact the first page.
-
while (it.has_next()) {
Page* p = it.next();
+ if (p->NeverEvacuate()) continue;
p->ClearEvacuationCandidate();
if (FLAG_stress_compaction) {
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698