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

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

Issue 1493653002: [heap] Clean up stale store buffer entries for aborted pages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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') | src/heap/spaces.h » ('J')
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 a4e96fbf8a65b8d6daaa53643f5f25484d4b163f..16e5bcf7cb8f99d90875135328deb82f71ea86fb 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3262,8 +3262,13 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
// happens upon moving (which we potentially didn't do).
// - Leave the page in the list of pages of a space since we could not
// fully evacuate it.
+ // - Mark them for rescanning for store buffer entries as we otherwise
+ // might have stale store buffer entries that become "valid" again
+ // after reusing the memory. Note that clearing store buffer entries
+ // for aborted pages happens below this block.
DCHECK(p->IsEvacuationCandidate());
p->SetFlag(Page::COMPACTION_WAS_ABORTED);
+ p->set_scan_on_scavenge(true);
abandoned_pages++;
break;
case MemoryChunk::kCompactingFinalize:
@@ -3281,6 +3286,9 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
}
p->parallel_compaction_state().SetValue(MemoryChunk::kCompactingDone);
}
+ if (abandoned_pages > 0) {
+ heap()->FilterStoreBufferEntriesForAbortedPages();
+ }
if (FLAG_trace_fragmentation) {
PrintIsolate(isolate(),
"%8.0f ms: compaction: parallel=%d pages=%d aborted=%d "
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.h » ('j') | src/heap/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698