Bug 1099152 - Call gcSlice() or gc() depending on whether we want a incemental GC or not r=terrence
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 02 Jan 2015 17:19:43 +0000
changeset 248563 a6b7338b7658b7e98b11a82c2e522ce9d5a6e1d0
parent 248562 c356ab8b348af6a10f7886fb75e687e511f637f9
child 248564 37bbd26f087003d5232a63dd38e97df0ed1f4ff7
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1099152
milestone37.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 1099152 - Call gcSlice() or gc() depending on whether we want a incemental GC or not r=terrence
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -3319,17 +3319,17 @@ GCRuntime::maybePeriodicFullGC()
      * This is a source of non-determinism, but is not called from the shell.
      *
      * Access to the counters and, on 32 bit, setting gcNextFullGCTime below
      * is not atomic and a race condition could trigger or suppress the GC. We
      * tolerate this.
      */
 #ifndef JS_MORE_DETERMINISTIC
     int64_t now = PRMJ_Now();
-    if (nextFullGCTime && nextFullGCTime <= now) {
+    if (nextFullGCTime && nextFullGCTime <= now && !isIncrementalGCInProgress()) {
         if (chunkAllocationSinceLastGC ||
             numArenasFreeCommitted > decommitThreshold)
         {
             JS::PrepareForFullGC(rt);
             gcSlice(GC_SHRINK, JS::gcreason::MAYBEGC);
         } else {
             nextFullGCTime = now + GC_IDLE_FULL_SPAN;
         }
@@ -6357,17 +6357,17 @@ GCRuntime::notifyDidPaint()
 
     if (zealMode == ZealFrameVerifierPostValue) {
         verifyPostBarriers();
         return;
     }
 
     if (zealMode == ZealFrameGCValue) {
         JS::PrepareForFullGC(rt);
-        gcSlice(GC_NORMAL, JS::gcreason::REFRESH_FRAME);
+        gc(GC_NORMAL, JS::gcreason::REFRESH_FRAME);
         return;
     }
 #endif
 
     if (JS::IsIncrementalGCInProgress(rt) && !interFrameGC) {
         JS::PrepareForIncrementalGC(rt);
         gcSlice(GC_NORMAL, JS::gcreason::REFRESH_FRAME);
     }