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

Unified Diff: src/incremental-marking.cc

Issue 7983045: Notify collector about lazily deoptimized code objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: clear lo from rescan flag, avoid ShouldSweepLazily predicate in preparation Created 9 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
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index f4ea1005796f301d1a71ece00e86b1032e5e3d99..d9725244a804aa3c1f6881ed5e2e1b39199a6f66 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -453,6 +453,19 @@ void IncrementalMarking::StartMarking() {
MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache());
}
+ if (is_compacting_) {
+ // It's difficult to filter out slots recorded for large objects.
+ LargeObjectIterator it(heap_->lo_space());
+ for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) {
+ if (obj->IsFixedArray() || obj->IsCode()) {
+ Page* p = Page::FromAddress(obj->address());
+ if (p->size() > static_cast<size_t>(Page::kPageSize)) {
+ p->SetFlag(Page::RESCAN_ON_EVACUATION);
+ }
+ }
+ }
+ }
+
// Mark strong roots grey.
IncrementalMarkingRootMarkingVisitor visitor(heap_, this);
heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
@@ -605,6 +618,16 @@ void IncrementalMarking::Abort() {
PatchIncrementalMarkingRecordWriteStubs(heap_,
RecordWriteStub::STORE_BUFFER_ONLY);
DeactivateIncrementalWriteBarrier();
+
+ if (is_compacting_) {
+ LargeObjectIterator it(heap_->lo_space());
+ for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) {
+ Page* p = Page::FromAddress(obj->address());
+ if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) {
+ p->ClearFlag(Page::RESCAN_ON_EVACUATION);
+ }
+ }
+ }
}
heap_->isolate()->stack_guard()->Continue(GC_REQUEST);
state_ = STOPPED;
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/mark-compact.h » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698