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

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

Issue 2021823002: [heap] Fix recording on aborted code pages (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | 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 7a4e2f2d03af344b27294e13720bf99cd0664d68..f45ef9f629ab5c53dd1a835edd45833949c70a70 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3138,8 +3138,11 @@ bool MarkCompactCollector::Evacuator::EvacuatePage(Page* page) {
case kObjectsOldToOld:
result = EvacuateSinglePage<kClearMarkbits>(page, &old_space_visitor_);
if (!result) {
- // Aborted compaction page. We can record slots here to have them
- // processed in parallel later on.
+ // Aborted compaction page. We have to record slots here, since we might
+ // not have recorded them in first place.
+ // Note: We mark the page as aborted here to be able to record slots
+ // for code objects in |RecordMigratedSlotVisitor|.
+ page->SetFlag(Page::COMPACTION_WAS_ABORTED);
EvacuateRecordOnlyVisitor record_visitor(collector_->heap());
result = EvacuateSinglePage<kKeepMarking>(page, &record_visitor);
DCHECK(result);
@@ -3234,7 +3237,6 @@ class EvacuationJobTraits {
} else {
// We have partially compacted the page, i.e., some objects may have
// moved, others are still in place.
- p->SetFlag(Page::COMPACTION_WAS_ABORTED);
p->ClearEvacuationCandidate();
// Slots have already been recorded so we just need to add it to the
// sweeper.
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698