Title: [117496] trunk/Source/_javascript_Core
Revision
117496
Author
gga...@apple.com
Date
2012-05-17 14:23:22 -0700 (Thu, 17 May 2012)

Log Message

Increase the GC allocation trigger
https://bugs.webkit.org/show_bug.cgi?id=86699

Reviewed by Sam Weinig.

This helps a lot when the heap is growing, and helps to resolve
the regression caused by r116484.

* heap/Heap.cpp:
(JSC::Heap::collect):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (117495 => 117496)


--- trunk/Source/_javascript_Core/ChangeLog	2012-05-17 21:21:26 UTC (rev 117495)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-05-17 21:23:22 UTC (rev 117496)
@@ -1,3 +1,16 @@
+2012-05-17  Geoffrey Garen  <gga...@apple.com>
+
+        Increase the GC allocation trigger
+        https://bugs.webkit.org/show_bug.cgi?id=86699
+
+        Reviewed by Sam Weinig.
+
+        This helps a lot when the heap is growing, and helps to resolve
+        the regression caused by r116484.
+
+        * heap/Heap.cpp:
+        (JSC::Heap::collect):
+
 2012-05-16  Mark Hahnenberg  <mhahnenb...@apple.com>
 
         GC in the middle of JSObject::allocatePropertyStorage can cause badness

Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (117495 => 117496)


--- trunk/Source/_javascript_Core/heap/Heap.cpp	2012-05-17 21:21:26 UTC (rev 117495)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp	2012-05-17 21:23:22 UTC (rev 117496)
@@ -795,15 +795,14 @@
         m_bytesAbandoned = 0;
     }
 
-    // To avoid pathological GC churn in large heaps, we set the new allocation 
-    // limit to be the current size of the heap. This heuristic 
-    // is a bit arbitrary. Using the current size of the heap after this 
-    // collection gives us a 2X multiplier, which is a 1:1 (heap size :
-    // new bytes allocated) proportion, and seems to work well in benchmarks.
+    // To avoid pathological GC churn in large / growing heaps, we set the
+    // new allocation limit based on the current heap size. Note: This
+    // number only governs "emergency" GC caused by rapid allocation,
+    // so it's OK to be liberal here.
     size_t newSize = size();
     if (fullGC) {
         m_sizeAfterLastCollect = newSize;
-        m_bytesAllocatedLimit = max(newSize, m_minBytesPerCycle);
+        m_bytesAllocatedLimit = max(2 * newSize, m_minBytesPerCycle);
     }
     m_bytesAllocated = 0;
     double lastGCEndTime = WTF::currentTime();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to