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

Unified Diff: Source/platform/heap/Heap.cpp

Issue 1159143006: Oilpan: Remove Heap::s_lastGCWasConservative (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index 0cfac56103240cf7f07d53f597ba8e2e5db6a007..1d8b513d344e1d1ce50f915b595650f97d559afb 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -1821,9 +1821,6 @@ Address Heap::checkAndMarkPointer(Visitor* visitor, Address address)
ASSERT(!page->orphaned());
ASSERT(!s_heapDoesNotContainCache->lookup(address));
page->checkAndMarkPointer(visitor, address);
- // FIXME: We only need to set the conservative flag if
- // checkAndMarkPointer actually marked the pointer.
- s_lastGCWasConservative = true;
return address;
}
@@ -2023,8 +2020,6 @@ void Heap::collectGarbage(ThreadState::StackState stackState, ThreadState::GCTyp
if (state->isMainThread())
ScriptForbiddenScope::enter();
- s_lastGCWasConservative = false;
-
TRACE_EVENT2("blink_gc", "Heap::collectGarbage",
"lazySweeping", gcType == ThreadState::GCWithoutSweep,
"gcReason", gcReasonString(reason));
@@ -2048,19 +2043,12 @@ void Heap::collectGarbage(ThreadState::StackState stackState, ThreadState::GCTyp
// 1. Trace persistent roots.
ThreadState::visitPersistentRoots(gcScope.visitor());
- // 2. Trace objects reachable from the persistent roots including
- // ephemerons.
- processMarkingStack(gcScope.visitor());
-
- // 3. Trace objects reachable from the stack. We do this independent of the
+ // 2. Trace objects reachable from the stack. We do this independent of the
// given stackState since other threads might have a different stack state.
ThreadState::visitStackRoots(gcScope.visitor());
- // 4. Trace objects reachable from the stack "roots" including ephemerons.
- // Only do the processing if we found a pointer to an object on one of the
- // thread stacks.
- if (lastGCWasConservative())
- processMarkingStack(gcScope.visitor());
+ // 3. Transitive closure to trace objects including ephemerons.
+ processMarkingStack(gcScope.visitor());
postMarkingProcessing(gcScope.visitor());
globalWeakProcessing(gcScope.visitor());
@@ -2351,7 +2339,6 @@ CallbackStack* Heap::s_globalWeakCallbackStack;
CallbackStack* Heap::s_ephemeronStack;
HeapDoesNotContainCache* Heap::s_heapDoesNotContainCache;
bool Heap::s_shutdownCalled = false;
-bool Heap::s_lastGCWasConservative = false;
FreePagePool* Heap::s_freePagePool;
OrphanedPagePool* Heap::s_orphanedPagePool;
Heap::RegionTree* Heap::s_regionTree = nullptr;
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698