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

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

Issue 2383443002: Revert of [heap] Remove border page (Closed)
Patch Set: Created 4 years, 3 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-inl.h ('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 a2ea7616a5cfaa616e367d8db0e2a27c241e147e..ec35c17e67ae6e4666c79a9ac80199d43523b535 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3147,13 +3147,15 @@ bool MarkCompactCollector::Evacuator::EvacuatePage(Page* page) {
if (FLAG_trace_evacuation) {
PrintIsolate(heap->isolate(),
"evacuation[%p]: page=%p new_space=%d "
- "page_evacuation=%d executable=%d live_bytes=%d time=%f\n",
+ "page_evacuation=%d executable=%d contains_age_mark=%d "
+ "live_bytes=%d time=%f\n",
static_cast<void*>(this), static_cast<void*>(page),
page->InNewSpace(),
page->IsFlagSet(Page::PAGE_NEW_OLD_PROMOTION) ||
page->IsFlagSet(Page::PAGE_NEW_NEW_PROMOTION),
- page->IsFlagSet(MemoryChunk::IS_EXECUTABLE), saved_live_bytes,
- evacuation_time);
+ page->IsFlagSet(MemoryChunk::IS_EXECUTABLE),
+ page->Contains(heap->new_space()->age_mark()),
+ saved_live_bytes, evacuation_time);
}
return success;
}
@@ -3264,11 +3266,13 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
}
const bool reduce_memory = heap()->ShouldReduceMemory();
+ const Address age_mark = heap()->new_space()->age_mark();
for (Page* page : newspace_evacuation_candidates_) {
live_bytes += page->LiveBytes();
if (!reduce_memory && !page->NeverEvacuate() &&
- (page->LiveBytes() > Evacuator::PageEvacuationThreshold())) {
- if (page->InIntermediateGeneration()) {
+ (page->LiveBytes() > Evacuator::PageEvacuationThreshold()) &&
+ !page->Contains(age_mark)) {
+ if (page->IsFlagSet(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK)) {
EvacuateNewSpacePageVisitor::MoveToOldSpace(page, heap()->old_space());
} else {
EvacuateNewSpacePageVisitor::MoveToToSpace(page);
@@ -3514,7 +3518,7 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
EvacuateNewSpacePrologue();
EvacuatePagesInParallel();
- heap()->new_space()->SealIntermediateGeneration();
+ heap()->new_space()->set_age_mark(heap()->new_space()->top());
}
UpdatePointersAfterEvacuation();
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698