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

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

Issue 1823783003: [heap] RecordWrites iterates black object to ensure marking progress. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/mark-compact.h ('k') | src/heap/mark-compact-inl.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 2a77888fa784b510f230743fd9e461d6ea29f66d..ed06f93e04801b94c3610275a809500028305933 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -1010,7 +1010,7 @@ void CodeFlusher::ProcessSharedFunctionInfoCandidates() {
void CodeFlusher::EvictCandidate(SharedFunctionInfo* shared_info) {
// Make sure previous flushing decisions are revisited.
- isolate_->heap()->incremental_marking()->RecordWrites(shared_info);
+ isolate_->heap()->incremental_marking()->IterateBlackObject(shared_info);
if (FLAG_trace_code_flushing) {
PrintF("[code-flushing abandons function-info: ");
@@ -1046,8 +1046,9 @@ void CodeFlusher::EvictCandidate(JSFunction* function) {
Object* undefined = isolate_->heap()->undefined_value();
// Make sure previous flushing decisions are revisited.
- isolate_->heap()->incremental_marking()->RecordWrites(function);
- isolate_->heap()->incremental_marking()->RecordWrites(function->shared());
+ isolate_->heap()->incremental_marking()->IterateBlackObject(function);
+ isolate_->heap()->incremental_marking()->IterateBlackObject(
+ function->shared());
if (FLAG_trace_code_flushing) {
PrintF("[code-flushing abandons closure: ");
@@ -1493,11 +1494,9 @@ void MarkCompactCollector::DiscoverGreyObjectsWithIterator(T* it) {
}
}
-template <LiveObjectIterationMode T>
void MarkCompactCollector::DiscoverGreyObjectsOnPage(MemoryChunk* p) {
DCHECK(!marking_deque()->IsFull());
- DCHECK(T == kGreyObjects || T == kGreyObjectsOnBlackPage);
- LiveObjectIterator<T> it(p);
+ LiveObjectIterator<kGreyObjects> it(p);
HeapObject* object = NULL;
while ((object = it.Next()) != NULL) {
MarkBit markbit = Marking::MarkBitFrom(object);
@@ -1777,10 +1776,8 @@ void MarkCompactCollector::DiscoverGreyObjectsInSpace(PagedSpace* space) {
PageIterator it(space);
while (it.has_next()) {
Page* p = it.next();
- if (p->IsFlagSet(Page::BLACK_PAGE)) {
- DiscoverGreyObjectsOnPage<kGreyObjectsOnBlackPage>(p);
- } else {
- DiscoverGreyObjectsOnPage<kGreyObjects>(p);
+ if (!p->IsFlagSet(Page::BLACK_PAGE)) {
+ DiscoverGreyObjectsOnPage(p);
}
if (marking_deque()->IsFull()) return;
}
@@ -1792,7 +1789,7 @@ void MarkCompactCollector::DiscoverGreyObjectsInNewSpace() {
NewSpacePageIterator it(space->bottom(), space->top());
while (it.has_next()) {
NewSpacePage* page = it.next();
- DiscoverGreyObjectsOnPage<kGreyObjects>(page);
+ DiscoverGreyObjectsOnPage(page);
if (marking_deque()->IsFull()) return;
}
}
« no previous file with comments | « src/heap/mark-compact.h ('k') | src/heap/mark-compact-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698