Index: Source/platform/heap/ThreadState.cpp |
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp |
index 0b06ceacab0bb033d7d863562c7c7acf73d172a3..ac82d0247a3fefb3d36f3d078f9a1002db3603b5 100644 |
--- a/Source/platform/heap/ThreadState.cpp |
+++ b/Source/platform/heap/ThreadState.cpp |
@@ -657,9 +657,14 @@ bool ThreadState::shouldSchedulePreciseGC() |
#endif |
} |
+bool ThreadState::shouldScheduleV8FollowupGC() |
+{ |
+ return judgeGCThreshold(32 * 1024 * 1024, 1.5); |
+} |
+ |
bool ThreadState::shouldSchedulePageNavigationGC(float estimatedRemovalRatio) |
{ |
- return judgeGCThreshold(1024 * 1024, 1.5); |
+ return judgeGCThreshold(1024 * 1024, 1.5 * (1 - estimatedRemovalRatio)); |
sof
2015/08/24 05:12:35
This change isn't covered by the description; inte
haraken
2015/08/24 05:14:15
This change has been already landed. Forgot to reb
|
} |
bool ThreadState::shouldForceConservativeGC() |
@@ -668,6 +673,21 @@ bool ThreadState::shouldForceConservativeGC() |
return judgeGCThreshold(32 * 1024 * 1024, 5.0); |
} |
+void ThreadState::scheduleV8FollowupGCIfNeeded() |
+{ |
+ ASSERT(checkThread()); |
+ if (isGCForbidden()) |
+ return; |
+ |
+ if (isSweepingInProgress()) |
+ return; |
+ ASSERT(!sweepForbidden()); |
+ |
+ Heap::reportMemoryUsageForTracing(); |
+ if (shouldScheduleV8FollowupGC()) |
+ schedulePreciseGC(); |
+} |
+ |
void ThreadState::schedulePageNavigationGCIfNeeded(float estimatedRemovalRatio) |
{ |
ASSERT(checkThread()); |