bug 1397864, put back the higher GC budget when GC is triggered by a timer, r=mccr8
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 07 Sep 2017 20:43:30 +0100
changeset 429114 c855cf7aa13b5c38d9c9aba98fa1467c95c0988b
parent 429113 eef129f6e50b67a1090d9847c9749f37c3352144
child 429115 83d8880fbf0e4301a8c600fd40cdd4a36d50a1ab
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1397864
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1397864, put back the higher GC budget when GC is triggered by a timer, r=mccr8
dom/base/nsJSEnvironment.cpp
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -1783,17 +1783,17 @@ bool
 InterSliceGCRunnerFired(TimeStamp aDeadline, void* aData)
 {
   nsJSContext::KillInterSliceGCRunner();
   MOZ_ASSERT(sActiveIntersliceGCBudget > 0);
   // We use longer budgets when the CC has been locked out but the CC has tried
   // to run since that means we may have significant amount garbage to collect
   // and better to GC in several longer slices than in a very long one.
   int64_t budget = aDeadline.IsNull() ?
-    int64_t(sActiveIntersliceGCBudget) :
+    int64_t(sActiveIntersliceGCBudget * 2) :
     int64_t((aDeadline - TimeStamp::Now()).ToMilliseconds());
   if (sCCLockedOut && sCCLockedOutTime) {
     int64_t lockedTime = PR_Now() - sCCLockedOutTime;
     int32_t maxSliceGCBudget = sActiveIntersliceGCBudget * 10;
     double percentOfLockedTime =
       std::min((double)lockedTime / NS_MAX_CC_LOCKEDOUT_TIME, 1.0);
     budget =
       static_cast<int64_t>(