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

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

Issue 1178063004: Oilpan: move "forced GC" handling back to gcEpilogue(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: compile fix 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/ThreadState.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/ThreadState.cpp
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
index 760689818b8d36969e9a433e36a72c201fa615cf..c45605a914098356bdf20fa59cae74e1e1206eea 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -817,7 +817,7 @@ ThreadState::GCState ThreadState::gcState() const
return m_gcState;
}
-void ThreadState::didV8MajorGC(bool forceGC)
+void ThreadState::didV8MajorGC()
{
checkThread();
if (isMainThread()) {
@@ -826,24 +826,6 @@ void ThreadState::didV8MajorGC(bool forceGC)
// references to their DOM objects.
Heap::setEstimatedLiveObjectSize(Heap::estimatedLiveObjectSize() / 2);
- if (forceGC) {
- // This single GC is not enough for two reasons:
- // (1) The GC is not precise because the GC scans on-stack pointers conservatively.
- // (2) One GC is not enough to break a chain of persistent handles. It's possible that
- // some heap allocated objects own objects that contain persistent handles
- // pointing to other heap allocated objects. To break the chain, we need multiple GCs.
- //
- // Regarding (1), we force a precise GC at the end of the current event loop. So if you want
- // to collect all garbage, you need to wait until the next event loop.
- // Regarding (2), it would be OK in practice to trigger only one GC per gcEpilogue, because
- // GCController.collectAll() forces 7 V8's GC.
- Heap::collectGarbage(ThreadState::HeapPointersOnStack, ThreadState::GCWithSweep, Heap::ForcedGC);
-
- // Forces a precise GC at the end of the current event loop.
- ThreadState::current()->setGCState(ThreadState::FullGCScheduled);
- return;
- }
-
// If under memory pressure, complete sweeping before initiating
// the urgent conservative GC.
if (shouldForceMemoryPressureGC())
« no previous file with comments | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698