<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[165933] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/165933">165933</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-19 17:18:26 -0700 (Wed, 19 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/165926">r165926</a>.
https://bugs.webkit.org/show_bug.cgi?id=130488

broke the iOS build (Requested by estes on #webkit).

Reverted changeset:

Source/JavaScriptCore:

&quot;GC timer should intelligently choose between EdenCollections
and FullCollections&quot;
https://bugs.webkit.org/show_bug.cgi?id=128261
http://trac.webkit.org/changeset/165926

Source/WebCore:

&quot;GC timer should intelligently choose between EdenCollections
and FullCollections&quot;
https://bugs.webkit.org/show_bug.cgi?id=128261
http://trac.webkit.org/changeset/165926</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreGNUmakefilelistam">trunk/Source/JavaScriptCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapGCActivityCallbackcpp">trunk/Source/JavaScriptCore/heap/GCActivityCallback.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapGCActivityCallbackh">trunk/Source/JavaScriptCore/heap/GCActivityCallback.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapcpp">trunk/Source/JavaScriptCore/heap/Heap.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeaph">trunk/Source/JavaScriptCore/heap/Heap.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapOperationh">trunk/Source/JavaScriptCore/heap/HeapOperation.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapStatisticscpp">trunk/Source/JavaScriptCore/heap/HeapStatistics.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapTimercpp">trunk/Source/JavaScriptCore/heap/HeapTimer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejsccpp">trunk/Source/JavaScriptCore/jsc.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOptionsh">trunk/Source/JavaScriptCore/runtime/Options.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebSafeGCActivityCallbackIOSh">trunk/Source/WebCore/platform/ios/WebSafeGCActivityCallbackIOS.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreheapEdenGCActivityCallbackcpp">trunk/Source/JavaScriptCore/heap/EdenGCActivityCallback.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapEdenGCActivityCallbackh">trunk/Source/JavaScriptCore/heap/EdenGCActivityCallback.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapFullGCActivityCallbackcpp">trunk/Source/JavaScriptCore/heap/FullGCActivityCallback.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapFullGCActivityCallbackh">trunk/Source/JavaScriptCore/heap/FullGCActivityCallback.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -215,8 +215,6 @@
</span><span class="cx">     heap/CopiedSpace.cpp
</span><span class="cx">     heap/CopyVisitor.cpp
</span><span class="cx">     heap/DeferGC.cpp
</span><del>-    heap/EdenGCActivityCallback.cpp
-    heap/FullGCActivityCallback.cpp
</del><span class="cx">     heap/GCActivityCallback.cpp
</span><span class="cx">     heap/GCThread.cpp
</span><span class="cx">     heap/GCThreadSharedData.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-03-19  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r165926.
+        https://bugs.webkit.org/show_bug.cgi?id=130488
+
+        broke the iOS build (Requested by estes on #webkit).
+
+        Reverted changeset:
+
+        &quot;GC timer should intelligently choose between EdenCollections
+        and FullCollections&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=128261
+        http://trac.webkit.org/changeset/165926
+
</ins><span class="cx"> 2014-03-13  Mark Hahnenberg  &lt;mhahnenberg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         GC timer should intelligently choose between EdenCollections and FullCollections
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/GNUmakefile.list.am (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/GNUmakefile.list.am        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/GNUmakefile.list.am        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -557,10 +557,6 @@
</span><span class="cx">     Source/JavaScriptCore/heap/DeferGC.cpp \
</span><span class="cx">         Source/JavaScriptCore/heap/DeferGC.h \
</span><span class="cx">     Source/JavaScriptCore/heap/DelayedReleaseScope.h \
</span><del>-        Source/JavaScriptCore/heap/EdenGCActivityCallback.cpp \
-        Source/JavaScriptCore/heap/EdenGCActivityCallback.h \
-        Source/JavaScriptCore/heap/FullGCActivityCallback.cpp \
-        Source/JavaScriptCore/heap/FullGCActivityCallback.h \
</del><span class="cx">         Source/JavaScriptCore/heap/GCActivityCallback.cpp \
</span><span class="cx">         Source/JavaScriptCore/heap/GCActivityCallback.h \
</span><span class="cx">         Source/JavaScriptCore/heap/GCSegmentedArray.h \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -463,8 +463,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\CopiedSpace.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\CopyVisitor.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\DeferGC.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\heap\EdenGCActivityCallback.cpp&quot; /&gt;
-    &lt;ClCompile Include=&quot;..\heap\FullGCActivityCallback.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\heap\GCActivityCallback.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\GCThread.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\GCThreadSharedData.cpp&quot; /&gt;
</span><span class="lines">@@ -1046,8 +1044,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\CopyWriteBarrier.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\DeferGC.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\DelayedReleaseScope.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\heap\EdenGCActivityCallback.h&quot; /&gt;
-    &lt;ClInclude Include=&quot;..\heap\FullGCActivityCallback.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\heap\GCActivityCallback.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\GCSegmentedArray.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\GCSegmentedArrayInlines.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -228,12 +228,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\CopyVisitor.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;heap&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\heap\EdenGCActivityCallback.cpp&quot;&gt;
-      &lt;Filter&gt;heap&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\heap\FullGCActivityCallback.cpp&quot;&gt;
-      &lt;Filter&gt;heap&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\heap\GCActivityCallback.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;heap&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -1691,12 +1685,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\DeferGC.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;heap&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\heap\EdenGCActivityCallback.h&quot;&gt;
-      &lt;Filter&gt;heap&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
-    &lt;ClInclude Include=&quot;..\heap\FullGCActivityCallback.h&quot;&gt;
-      &lt;Filter&gt;heap&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\heap\GCActivityCallback.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;heap&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -786,10 +786,6 @@
</span><span class="cx">                 2A68295B1875F80500B6C3E2 /* CopyWriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A68295A1875F80500B6C3E2 /* CopyWriteBarrier.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2A6F462617E959CE00C45C98 /* HeapOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A6F462517E959CE00C45C98 /* HeapOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2A7A58EF1808A4C40020BDF7 /* DeferGC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2A7A58EE1808A4C40020BDF7 /* DeferGC.cpp */; };
</span><del>-                2A83638518D7D0EE0000EBCC /* EdenGCActivityCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2A83638318D7D0EE0000EBCC /* EdenGCActivityCallback.cpp */; };
-                2A83638618D7D0EE0000EBCC /* EdenGCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A83638418D7D0EE0000EBCC /* EdenGCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                2A83638918D7D0FE0000EBCC /* FullGCActivityCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2A83638718D7D0FE0000EBCC /* FullGCActivityCallback.cpp */; };
-                2A83638A18D7D0FE0000EBCC /* FullGCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A83638818D7D0FE0000EBCC /* FullGCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 2AAAA31218BD49D100394CC8 /* StructureIDBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AAAA31018BD49D100394CC8 /* StructureIDBlob.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2AACE63C18CA5A0300ED0191 /* GCActivityCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AACE63A18CA5A0300ED0191 /* GCActivityCallback.cpp */; };
</span><span class="cx">                 2AACE63D18CA5A0300ED0191 /* GCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AACE63B18CA5A0300ED0191 /* GCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2272,10 +2268,6 @@
</span><span class="cx">                 2A68295A1875F80500B6C3E2 /* CopyWriteBarrier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyWriteBarrier.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2A6F462517E959CE00C45C98 /* HeapOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapOperation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2A7A58EE1808A4C40020BDF7 /* DeferGC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeferGC.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                2A83638318D7D0EE0000EBCC /* EdenGCActivityCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EdenGCActivityCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                2A83638418D7D0EE0000EBCC /* EdenGCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EdenGCActivityCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                2A83638718D7D0FE0000EBCC /* FullGCActivityCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FullGCActivityCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                2A83638818D7D0FE0000EBCC /* FullGCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FullGCActivityCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 2AAAA31018BD49D100394CC8 /* StructureIDBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureIDBlob.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2AACE63A18CA5A0300ED0191 /* GCActivityCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCActivityCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2AACE63B18CA5A0300ED0191 /* GCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCActivityCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -3609,10 +3601,6 @@
</span><span class="cx">                                 2A4EC90A1860D6C20094F782 /* WriteBarrierBuffer.h */,
</span><span class="cx">                                 0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */,
</span><span class="cx">                                 0FC8150914043BD200CFA603 /* WriteBarrierSupport.h */,
</span><del>-                                2A83638318D7D0EE0000EBCC /* EdenGCActivityCallback.cpp */,
-                                2A83638418D7D0EE0000EBCC /* EdenGCActivityCallback.h */,
-                                2A83638718D7D0FE0000EBCC /* FullGCActivityCallback.cpp */,
-                                2A83638818D7D0FE0000EBCC /* FullGCActivityCallback.h */,
</del><span class="cx">                         );
</span><span class="cx">                         path = heap;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -4932,8 +4920,6 @@
</span><span class="cx">                                 86D3B2C410156BDE002865E7 /* ARMAssembler.h in Headers */,
</span><span class="cx">                                 A584032018BFFBE1005A0811 /* InspectorAgent.h in Headers */,
</span><span class="cx">                                 2AACE63D18CA5A0300ED0191 /* GCActivityCallback.h in Headers */,
</span><del>-                                2A83638618D7D0EE0000EBCC /* EdenGCActivityCallback.h in Headers */,
-                                2A83638A18D7D0FE0000EBCC /* FullGCActivityCallback.h in Headers */,
</del><span class="cx">                                 2AAAA31218BD49D100394CC8 /* StructureIDBlob.h in Headers */,
</span><span class="cx">                                 A54E8EB118BFFBBE00556D28 /* GCSegmentedArrayInlines.h in Headers */,
</span><span class="cx">                                 86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */,
</span><span class="lines">@@ -6237,7 +6223,6 @@
</span><span class="cx">                                 147F39C2107EC37600427A48 /* Completion.cpp in Sources */,
</span><span class="cx">                                 146B16D812EB5B59001BEC1B /* ConservativeRoots.cpp in Sources */,
</span><span class="cx">                                 A5FD0079189B051000633231 /* ConsoleMessage.cpp in Sources */,
</span><del>-                                2A83638518D7D0EE0000EBCC /* EdenGCActivityCallback.cpp in Sources */,
</del><span class="cx">                                 1428082E107EC0570013E7B2 /* ConstructData.cpp in Sources */,
</span><span class="cx">                                 A57D23F11891B5B40031C7FA /* ContentSearchUtilities.cpp in Sources */,
</span><span class="cx">                                 C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */,
</span><span class="lines">@@ -6538,7 +6523,6 @@
</span><span class="cx">                                 0F919D10157F3329004A4E7D /* JSSegmentedVariableObject.cpp in Sources */,
</span><span class="cx">                                 A7299D9D17D12837005F5FF9 /* JSSet.cpp in Sources */,
</span><span class="cx">                                 A790DD6F182F499700588807 /* JSSetIterator.cpp in Sources */,
</span><del>-                                2A83638918D7D0FE0000EBCC /* FullGCActivityCallback.cpp in Sources */,
</del><span class="cx">                                 1428083A107EC0750013E7B2 /* JSStack.cpp in Sources */,
</span><span class="cx">                                 147F39D5107EC37600427A48 /* JSString.cpp in Sources */,
</span><span class="cx">                                 2600B5A6152BAAA70091EE5F /* JSStringJoiner.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapEdenGCActivityCallbackcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/heap/EdenGCActivityCallback.cpp (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/EdenGCActivityCallback.cpp        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/EdenGCActivityCallback.cpp        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -1,93 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;EdenGCActivityCallback.h&quot;
-
-#include &quot;VM.h&quot;
-
-namespace JSC {
-
-#if USE(CF) || PLATFORM(EFL)
-
-EdenGCActivityCallback::EdenGCActivityCallback(Heap* heap)
-    : GCActivityCallback(heap)
-{
-}
-
-void EdenGCActivityCallback::doCollection()
-{
-    m_vm-&gt;heap.collect(EdenCollection);
-}
-
-double EdenGCActivityCallback::lastGCLength()
-{
-    return m_vm-&gt;heap.lastEdenGCLength();
-}
-
-double EdenGCActivityCallback::deathRate()
-{
-    Heap* heap = &amp;m_vm-&gt;heap;
-    size_t sizeBefore = heap-&gt;sizeBeforeLastEdenCollection();
-    size_t sizeAfter = heap-&gt;sizeAfterLastEdenCollection();
-    if (!sizeBefore)
-        return 1.0;
-    return static_cast&lt;double&gt;(sizeBefore - sizeAfter) / static_cast&lt;double&gt;(sizeBefore);
-}
-
-double EdenGCActivityCallback::gcTimeSlice(size_t bytes)
-{
-    return std::min((static_cast&lt;double&gt;(bytes) / MB) * Options::percentCPUPerMBForEdenTimer(), Options::collectionTimerMaxPercentCPU());
-}
-
-#else
-
-EdenGCActivityCallback::EdenGCActivityCallback(Heap* heap)
-    : GCActivityCallback(heap-&gt;vm())
-{
-}
-
-void EdenGCActivityCallback::doCollection()
-{
-}
-
-double EdenGCActivityCallback::lastGCLength()
-{
-    return 0;
-}
-
-double EdenGCActivityCallback::deathRate()
-{
-    return 0;
-}
-
-double EdenGCActivityCallback::gcTimeSlice(size_t)
-{
-    return 0;
-}
-
-#endif // USE(CF) || PLATFORM(EFL)
-
-} // namespace JSC
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapEdenGCActivityCallbackh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/heap/EdenGCActivityCallback.h (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/EdenGCActivityCallback.h        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/EdenGCActivityCallback.h        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -1,59 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EdenGCActivityCallback_h
-#define EdenGCActivityCallback_h
-
-#include &quot;GCActivityCallback.h&quot;
-
-namespace JSC {
-
-class EdenGCActivityCallback : public GCActivityCallback {
-public:
-    EdenGCActivityCallback(Heap*);
-
-    virtual void doCollection() override;
-
-protected:
-#if USE(CF)
-    EdenGCActivityCallback(Heap* heap, CFRunLoopRef runLoop)
-        : GCActivityCallback(heap, runLoop)
-    {
-    }
-#endif
-
-    virtual double lastGCLength() override;
-    virtual double gcTimeSlice(size_t bytes) override;
-    virtual double deathRate() override;
-};
-
-inline PassRefPtr&lt;GCActivityCallback&gt; GCActivityCallback::createEdenTimer(Heap* heap)
-{
-    return s_shouldCreateGCTimer ? adoptRef(new EdenGCActivityCallback(heap)) : nullptr;
-}
-
-} // namespace JSC
-
-#endif // EdenGCActivityCallback_h
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapFullGCActivityCallbackcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/heap/FullGCActivityCallback.cpp (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/FullGCActivityCallback.cpp        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/FullGCActivityCallback.cpp        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -1,108 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;FullGCActivityCallback.h&quot;
-
-#include &quot;VM.h&quot;
-
-namespace JSC {
-
-#if USE(CF) || PLATFORM(EFL)
-
-#if !PLATFORM(IOS)
-const double pagingTimeOut = 0.1; // Time in seconds to allow opportunistic timer to iterate over all blocks to see if the Heap is paged out.
-#endif
-
-FullGCActivityCallback::FullGCActivityCallback(Heap* heap)
-    : GCActivityCallback(heap)
-{
-}
-
-void FullGCActivityCallback::doCollection()
-{
-    Heap* heap = &amp;m_vm-&gt;heap;
-
-#if !PLATFORM(IOS)
-    double startTime = WTF::monotonicallyIncreasingTime();
-    if (heap-&gt;isPagedOut(startTime + pagingTimeOut)) {
-        cancel();
-        heap-&gt;increaseLastFullGCLength(pagingTimeOut);
-        return;
-    }
-#endif
-
-    heap-&gt;collect(FullCollection);
-}
-
-double FullGCActivityCallback::lastGCLength()
-{
-    return m_vm-&gt;heap.lastFullGCLength();
-}
-
-double FullGCActivityCallback::deathRate()
-{
-    Heap* heap = &amp;m_vm-&gt;heap;
-    size_t sizeBefore = heap-&gt;sizeBeforeLastFullCollection();
-    size_t sizeAfter = heap-&gt;sizeAfterLastFullCollection();
-    if (!sizeBefore)
-        return 1.0;
-    return static_cast&lt;double&gt;(sizeBefore - sizeAfter) / static_cast&lt;double&gt;(sizeBefore);
-}
-
-double FullGCActivityCallback::gcTimeSlice(size_t bytes)
-{
-    return std::min((static_cast&lt;double&gt;(bytes) / MB) * Options::percentCPUPerMBForFullTimer(), Options::collectionTimerMaxPercentCPU());
-}
-
-#else
-
-FullGCActivityCallback::FullGCActivityCallback(Heap* heap)
-    : GCActivityCallback(heap)
-{
-}
-
-void FullGCActivityCallback::doCollection()
-{
-}
-
-double FullGCActivityCallback::lastGCLength()
-{
-    return 0;
-}
-
-double FullGCActivityCallback::deathRate()
-{
-    return 0;
-}
-
-double FullGCActivityCallback::gcTimeSlice(size_t)
-{
-    return 0;
-}
-
-#endif // USE(CF) || PLATFORM(EFL)
-
-} // namespace JSC
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapFullGCActivityCallbackh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/heap/FullGCActivityCallback.h (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/FullGCActivityCallback.h        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/FullGCActivityCallback.h        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -1,59 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FullGCActivityCallback_h
-#define FullGCActivityCallback_h
-
-#include &quot;GCActivityCallback.h&quot;
-
-namespace JSC {
-
-class FullGCActivityCallback : public GCActivityCallback {
-public:
-    FullGCActivityCallback(Heap*);
-
-    virtual void doCollection() override;
-
-protected:
-#if USE(CF)
-    FullGCActivityCallback(Heap* heap, CFRunLoopRef runLoop)
-        : GCActivityCallback(heap, runLoop)
-    {
-    }
-#endif
-
-    virtual double lastGCLength() override;
-    virtual double gcTimeSlice(size_t bytes) override;
-    virtual double deathRate() override;
-};
-
-inline PassRefPtr&lt;GCActivityCallback&gt; GCActivityCallback::createFullTimer(Heap* heap)
-{
-    return s_shouldCreateGCTimer ? adoptRef(new FullGCActivityCallback(heap)) : nullptr;
-}
-
-} // namespace JSC
-
-#endif // FullGCActivityCallback_h
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCActivityCallbackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/GCActivityCallback.cpp (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCActivityCallback.cpp        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/GCActivityCallback.cpp        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -47,26 +47,39 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(CF) || PLATFORM(EFL)
</span><span class="cx"> 
</span><ins>+const double gcTimeSlicePerMB = 0.01; // Percentage of CPU time we will spend to reclaim 1 MB
+const double maxGCTimeSlice = 0.05; // The maximum amount of CPU time we want to use for opportunistic timer-triggered collections.
</ins><span class="cx"> const double timerSlop = 2.0; // Fudge factor to avoid performance cost of resetting timer.
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+const double pagingTimeOut = 0.1; // Time in seconds to allow opportunistic timer to iterate over all blocks to see if the Heap is paged out.
+#endif
+
+#if !USE(CF)
+const double hour = 60 * 60;
+#endif
+
</ins><span class="cx"> #if USE(CF)
</span><del>-GCActivityCallback::GCActivityCallback(Heap* heap)
</del><ins>+DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
</ins><span class="cx">     : GCActivityCallback(heap-&gt;vm(), CFRunLoopGetCurrent())
</span><ins>+    , m_delay(s_decade)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCActivityCallback::GCActivityCallback(Heap* heap, CFRunLoopRef runLoop)
</del><ins>+DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap, CFRunLoopRef runLoop)
</ins><span class="cx">     : GCActivityCallback(heap-&gt;vm(), runLoop)
</span><ins>+    , m_delay(s_decade)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> #elif PLATFORM(EFL)
</span><del>-GCActivityCallback::GCActivityCallback(Heap* heap)
</del><ins>+DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
</ins><span class="cx">     : GCActivityCallback(heap-&gt;vm(), WTF::isMainThread())
</span><ins>+    , m_delay(hour)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void GCActivityCallback::doWork()
</del><ins>+void DefaultGCActivityCallback::doWork()
</ins><span class="cx"> {
</span><span class="cx">     Heap* heap = &amp;m_vm-&gt;heap;
</span><span class="cx">     if (!isEnabled())
</span><span class="lines">@@ -78,11 +91,20 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    doCollection();
</del><ins>+#if !PLATFORM(IOS)
+    double startTime = WTF::monotonicallyIncreasingTime();
+    if (heap-&gt;isPagedOut(startTime + pagingTimeOut)) {
+        heap-&gt;activityCallback()-&gt;cancel();
+        heap-&gt;increaseLastGCLength(pagingTimeOut);
+        return;
+    }
+#endif
+    heap-&gt;gcTimerDidFire();
+    heap-&gt;collect();
</ins><span class="cx"> }
</span><del>-
</del><ins>+    
</ins><span class="cx"> #if USE(CF)
</span><del>-void GCActivityCallback::scheduleTimer(double newDelay)
</del><ins>+void DefaultGCActivityCallback::scheduleTimer(double newDelay)
</ins><span class="cx"> {
</span><span class="cx">     if (newDelay * timerSlop &gt; m_delay)
</span><span class="cx">         return;
</span><span class="lines">@@ -91,13 +113,13 @@
</span><span class="cx">     CFRunLoopTimerSetNextFireDate(m_timer.get(), CFRunLoopTimerGetNextFireDate(m_timer.get()) - delta);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GCActivityCallback::cancelTimer()
</del><ins>+void DefaultGCActivityCallback::cancelTimer()
</ins><span class="cx"> {
</span><span class="cx">     m_delay = s_decade;
</span><span class="cx">     CFRunLoopTimerSetNextFireDate(m_timer.get(), CFAbsoluteTimeGetCurrent() + s_decade);
</span><span class="cx"> }
</span><span class="cx"> #elif PLATFORM(EFL)
</span><del>-void GCActivityCallback::scheduleTimer(double newDelay)
</del><ins>+void DefaultGCActivityCallback::scheduleTimer(double newDelay)
</ins><span class="cx"> {
</span><span class="cx">     if (newDelay * timerSlop &gt; m_delay)
</span><span class="cx">         return;
</span><span class="lines">@@ -109,14 +131,14 @@
</span><span class="cx">     m_timer = add(newDelay, this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GCActivityCallback::cancelTimer()
</del><ins>+void DefaultGCActivityCallback::cancelTimer()
</ins><span class="cx"> {
</span><del>-    m_delay = s_hour;
</del><ins>+    m_delay = hour;
</ins><span class="cx">     stop();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void GCActivityCallback::didAllocate(size_t bytes)
</del><ins>+void DefaultGCActivityCallback::didAllocate(size_t bytes)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx">     if (!isEnabled())
</span><span class="lines">@@ -129,41 +151,42 @@
</span><span class="cx">     // We pretend it's one byte so that we don't ignore this allocation entirely.
</span><span class="cx">     if (!bytes)
</span><span class="cx">         bytes = 1;
</span><del>-    double bytesExpectedToReclaim = static_cast&lt;double&gt;(bytes) * deathRate();
-    double newDelay = lastGCLength() / gcTimeSlice(bytesExpectedToReclaim);
</del><ins>+    Heap* heap = static_cast&lt;Heap*&gt;(&amp;m_vm-&gt;heap);
+    double gcTimeSlice = std::min((static_cast&lt;double&gt;(bytes) / MB) * gcTimeSlicePerMB, maxGCTimeSlice);
+    double newDelay = heap-&gt;lastGCLength() / gcTimeSlice;
</ins><span class="cx">     scheduleTimer(newDelay);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GCActivityCallback::willCollect()
</del><ins>+void DefaultGCActivityCallback::willCollect()
</ins><span class="cx"> {
</span><span class="cx">     cancelTimer();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GCActivityCallback::cancel()
</del><ins>+void DefaultGCActivityCallback::cancel()
</ins><span class="cx"> {
</span><span class="cx">     cancelTimer();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #else
</span><span class="cx"> 
</span><del>-GCActivityCallback::GCActivityCallback(Heap* heap)
</del><ins>+DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
</ins><span class="cx">     : GCActivityCallback(heap-&gt;vm())
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GCActivityCallback::doWork()
</del><ins>+void DefaultGCActivityCallback::doWork()
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GCActivityCallback::didAllocate(size_t)
</del><ins>+void DefaultGCActivityCallback::didAllocate(size_t)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GCActivityCallback::willCollect()
</del><ins>+void DefaultGCActivityCallback::willCollect()
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GCActivityCallback::cancel()
</del><ins>+void DefaultGCActivityCallback::cancel()
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCActivityCallbackh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/GCActivityCallback.h (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCActivityCallback.h        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/GCActivityCallback.h        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;HeapTimer.h&quot;
</span><span class="cx"> #include &lt;wtf/OwnPtr.h&gt;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><ins>+#include &lt;wtf/PassOwnPtr.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if USE(CF)
</span><span class="cx"> #include &lt;CoreFoundation/CoreFoundation.h&gt;
</span><span class="lines">@@ -41,44 +41,28 @@
</span><span class="cx"> 
</span><span class="cx"> class Heap;
</span><span class="cx"> 
</span><del>-class GCActivityCallback : public HeapTimer, public ThreadSafeRefCounted&lt;GCActivityCallback&gt; {
</del><ins>+class GCActivityCallback : public HeapTimer {
</ins><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;GCActivityCallback&gt; createFullTimer(Heap*);
-    static PassRefPtr&lt;GCActivityCallback&gt; createEdenTimer(Heap*);
-
-    GCActivityCallback(Heap*);
-
-    virtual void doWork() override;
-
-    virtual void doCollection() = 0;
-
-    virtual void didAllocate(size_t);
-    virtual void willCollect();
-    virtual void cancel();
</del><ins>+    virtual void didAllocate(size_t) { }
+    virtual void willCollect() { }
+    virtual void cancel() { }
</ins><span class="cx">     bool isEnabled() const { return m_enabled; }
</span><span class="cx">     void setEnabled(bool enabled) { m_enabled = enabled; }
</span><span class="cx"> 
</span><span class="cx">     static bool s_shouldCreateGCTimer;
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    virtual double lastGCLength() = 0;
-    virtual double gcTimeSlice(size_t bytes) = 0;
-    virtual double deathRate() = 0;
-
</del><span class="cx"> #if USE(CF)
</span><span class="cx">     GCActivityCallback(VM* vm, CFRunLoopRef runLoop)
</span><span class="cx">         : HeapTimer(vm, runLoop)
</span><span class="cx">         , m_enabled(true)
</span><del>-        , m_delay(s_decade)
</del><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> #elif PLATFORM(EFL)
</span><del>-    static constexpr double s_hour = 3600;
</del><span class="cx">     GCActivityCallback(VM* vm, bool flag)
</span><span class="cx">         : HeapTimer(vm)
</span><span class="cx">         , m_enabled(flag)
</span><del>-        , m_delay(s_hour)
</del><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> #else
</span><span class="lines">@@ -90,10 +74,23 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     bool m_enabled;
</span><ins>+};
</ins><span class="cx"> 
</span><ins>+class DefaultGCActivityCallback : public GCActivityCallback {
+public:
+    static PassOwnPtr&lt;DefaultGCActivityCallback&gt; create(Heap*);
+
+    DefaultGCActivityCallback(Heap*);
+
+    JS_EXPORT_PRIVATE virtual void didAllocate(size_t) override;
+    JS_EXPORT_PRIVATE virtual void willCollect() override;
+    JS_EXPORT_PRIVATE virtual void cancel() override;
+
+    JS_EXPORT_PRIVATE virtual void doWork() override;
+
</ins><span class="cx"> #if USE(CF)
</span><span class="cx"> protected:
</span><del>-    JS_EXPORT_PRIVATE GCActivityCallback(Heap*, CFRunLoopRef);
</del><ins>+    JS_EXPORT_PRIVATE DefaultGCActivityCallback(Heap*, CFRunLoopRef);
</ins><span class="cx"> #endif
</span><span class="cx"> #if USE(CF) || PLATFORM(EFL)
</span><span class="cx"> protected:
</span><span class="lines">@@ -105,6 +102,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-} // namespace JSC
</del><ins>+inline PassOwnPtr&lt;DefaultGCActivityCallback&gt; DefaultGCActivityCallback::create(Heap* heap)
+{
+    return GCActivityCallback::s_shouldCreateGCTimer ? adoptPtr(new DefaultGCActivityCallback(heap)) : nullptr;
+}
</ins><span class="cx"> 
</span><ins>+}
+
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.cpp (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.cpp        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/Heap.cpp        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -28,8 +28,6 @@
</span><span class="cx"> #include &quot;CopyVisitorInlines.h&quot;
</span><span class="cx"> #include &quot;DFGWorklist.h&quot;
</span><span class="cx"> #include &quot;DelayedReleaseScope.h&quot;
</span><del>-#include &quot;EdenGCActivityCallback.h&quot;
-#include &quot;FullGCActivityCallback.h&quot;
</del><span class="cx"> #include &quot;GCActivityCallback.h&quot;
</span><span class="cx"> #include &quot;GCIncomingRefCountedSetInlines.h&quot;
</span><span class="cx"> #include &quot;HeapIterationScope.h&quot;
</span><span class="lines">@@ -255,12 +253,8 @@
</span><span class="cx">     , m_ramSize(ramSize())
</span><span class="cx">     , m_minBytesPerCycle(minHeapSize(m_heapType, m_ramSize))
</span><span class="cx">     , m_sizeAfterLastCollect(0)
</span><del>-    , m_sizeAfterLastFullCollect(0)
-    , m_sizeBeforeLastFullCollect(0)
-    , m_sizeAfterLastEdenCollect(0)
-    , m_sizeBeforeLastEdenCollect(0)
</del><span class="cx">     , m_bytesAllocatedThisCycle(0)
</span><del>-    , m_bytesAbandonedSinceLastFullCollect(0)
</del><ins>+    , m_bytesAbandonedThisCycle(0)
</ins><span class="cx">     , m_maxEdenSize(m_minBytesPerCycle)
</span><span class="cx">     , m_maxHeapSize(m_minBytesPerCycle)
</span><span class="cx">     , m_shouldDoFullCollection(false)
</span><span class="lines">@@ -280,15 +274,9 @@
</span><span class="cx">     , m_isSafeToCollect(false)
</span><span class="cx">     , m_writeBarrierBuffer(256)
</span><span class="cx">     , m_vm(vm)
</span><del>-    , m_lastFullGCLength(0)
-    , m_lastEdenGCLength(0)
</del><ins>+    , m_lastGCLength(0)
</ins><span class="cx">     , m_lastCodeDiscardTime(WTF::monotonicallyIncreasingTime())
</span><del>-    , m_fullActivityCallback(GCActivityCallback::createFullTimer(this))
-#if ENABLE(GGC)
-    , m_edenActivityCallback(GCActivityCallback::createEdenTimer(this))
-#else
-    , m_edenActivityCallback(m_fullActivityCallback)
-#endif
</del><ins>+    , m_activityCallback(DefaultGCActivityCallback::create(this))
</ins><span class="cx">     , m_sweeper(IncrementalSweeper::create(this))
</span><span class="cx">     , m_deferralDepth(0)
</span><span class="cx"> {
</span><span class="lines">@@ -335,7 +323,7 @@
</span><span class="cx"> {
</span><span class="cx">     // Our clients don't know exactly how much memory they
</span><span class="cx">     // are abandoning so we just guess for them.
</span><del>-    double abandonedBytes = 0.1 * m_sizeAfterLastCollect;
</del><ins>+    double abandonedBytes = 0.10 * m_sizeAfterLastCollect;
</ins><span class="cx"> 
</span><span class="cx">     // We want to accelerate the next collection. Because memory has just 
</span><span class="cx">     // been abandoned, the next collection has the potential to 
</span><span class="lines">@@ -346,11 +334,9 @@
</span><span class="cx"> 
</span><span class="cx"> void Heap::didAbandon(size_t bytes)
</span><span class="cx"> {
</span><del>-    if (m_fullActivityCallback) {
-        m_fullActivityCallback-&gt;didAllocate(
-            m_sizeAfterLastCollect - m_sizeAfterLastFullCollect + m_bytesAllocatedThisCycle + m_bytesAbandonedSinceLastFullCollect);
-    }
-    m_bytesAbandonedSinceLastFullCollect += bytes;
</del><ins>+    if (m_activityCallback)
+        m_activityCallback-&gt;didAllocate(m_bytesAllocatedThisCycle + m_bytesAbandonedThisCycle);
+    m_bytesAbandonedThisCycle += bytes;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Heap::protect(JSValue k)
</span><span class="lines">@@ -860,7 +846,8 @@
</span><span class="cx">     if (!m_isSafeToCollect)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    collect(FullCollection);
</del><ins>+    m_shouldDoFullCollection = true;
+    collect();
</ins><span class="cx"> 
</span><span class="cx">     SamplingRegion samplingRegion(&quot;Garbage Collection: Sweeping&quot;);
</span><span class="cx">     DelayedReleaseScope delayedReleaseScope(m_objectSpace);
</span><span class="lines">@@ -870,7 +857,7 @@
</span><span class="cx"> 
</span><span class="cx"> static double minute = 60.0;
</span><span class="cx"> 
</span><del>-void Heap::collect(HeapOperation collectionType)
</del><ins>+void Heap::collect()
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(ALLOCATION_LOGGING)
</span><span class="cx">     dataLogF(&quot;JSC GC starting collection.\n&quot;);
</span><span class="lines">@@ -893,7 +880,7 @@
</span><span class="cx">     RELEASE_ASSERT(m_operationInProgress == NoOperation);
</span><span class="cx"> 
</span><span class="cx">     suspendCompilerThreads();
</span><del>-    willStartCollection(collectionType);
</del><ins>+    willStartCollection();
</ins><span class="cx"> 
</span><span class="cx">     double gcStartTime = WTF::monotonicallyIncreasingTime();
</span><span class="cx"> 
</span><span class="lines">@@ -940,10 +927,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Heap::willStartCollection(HeapOperation collectionType)
</del><ins>+void Heap::willStartCollection()
</ins><span class="cx"> {
</span><span class="cx">     GCPHASE(StartingCollection);
</span><del>-    if (shouldDoFullCollection(collectionType)) {
</del><ins>+    if (shouldDoFullCollection()) {
</ins><span class="cx">         m_operationInProgress = FullCollection;
</span><span class="cx">         m_slotVisitor.clearMarkStack();
</span><span class="cx">         m_shouldDoFullCollection = false;
</span><span class="lines">@@ -954,19 +941,11 @@
</span><span class="cx">         if (Options::logGC())
</span><span class="cx">             dataLog(&quot;EdenCollection, &quot;);
</span><span class="cx">     }
</span><del>-    if (m_operationInProgress == FullCollection) {
-        m_sizeBeforeLastFullCollect = m_sizeAfterLastCollect + m_bytesAllocatedThisCycle;
</del><ins>+    if (m_operationInProgress == FullCollection)
</ins><span class="cx">         m_extraMemoryUsage = 0;
</span><span class="cx"> 
</span><del>-        if (m_fullActivityCallback)
-            m_fullActivityCallback-&gt;willCollect();
-    } else {
-        ASSERT(m_operationInProgress == EdenCollection);
-        m_sizeBeforeLastEdenCollect = m_sizeAfterLastCollect + m_bytesAllocatedThisCycle;
-    }
-
-    if (m_edenActivityCallback)
-        m_edenActivityCallback-&gt;willCollect();
</del><ins>+    if (m_activityCallback)
+        m_activityCallback-&gt;willCollect();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Heap::deleteOldCode(double gcStartTime)
</span><span class="lines">@@ -1064,26 +1043,20 @@
</span><span class="cx">         // fixed minimum.
</span><span class="cx">         m_maxHeapSize = max(minHeapSize(m_heapType, m_ramSize), proportionalHeapSize(currentHeapSize, m_ramSize));
</span><span class="cx">         m_maxEdenSize = m_maxHeapSize - currentHeapSize;
</span><del>-        m_sizeAfterLastFullCollect = currentHeapSize;
-        m_bytesAbandonedSinceLastFullCollect = 0;
</del><span class="cx">     } else {
</span><span class="cx">         ASSERT(currentHeapSize &gt;= m_sizeAfterLastCollect);
</span><span class="cx">         m_maxEdenSize = m_maxHeapSize - currentHeapSize;
</span><del>-        m_sizeAfterLastEdenCollect = currentHeapSize;
</del><span class="cx">         double edenToOldGenerationRatio = (double)m_maxEdenSize / (double)m_maxHeapSize;
</span><span class="cx">         double minEdenToOldGenerationRatio = 1.0 / 3.0;
</span><span class="cx">         if (edenToOldGenerationRatio &lt; minEdenToOldGenerationRatio)
</span><span class="cx">             m_shouldDoFullCollection = true;
</span><span class="cx">         m_maxHeapSize += currentHeapSize - m_sizeAfterLastCollect;
</span><span class="cx">         m_maxEdenSize = m_maxHeapSize - currentHeapSize;
</span><del>-        if (m_fullActivityCallback) {
-            ASSERT(currentHeapSize &gt;= m_sizeAfterLastFullCollect);
-            m_fullActivityCallback-&gt;didAllocate(currentHeapSize - m_sizeAfterLastFullCollect);
-        }
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_sizeAfterLastCollect = currentHeapSize;
</span><span class="cx">     m_bytesAllocatedThisCycle = 0;
</span><ins>+    m_bytesAbandonedThisCycle = 0;
</ins><span class="cx"> 
</span><span class="cx">     if (Options::logGC())
</span><span class="cx">         dataLog(currentHeapSize / 1024, &quot; kb, &quot;);
</span><span class="lines">@@ -1093,10 +1066,7 @@
</span><span class="cx"> {
</span><span class="cx">     GCPHASE(FinishingCollection);
</span><span class="cx">     double gcEndTime = WTF::monotonicallyIncreasingTime();
</span><del>-    if (m_operationInProgress == FullCollection)
-        m_lastFullGCLength = gcEndTime - gcStartTime;
-    else
-        m_lastEdenGCLength = gcEndTime - gcStartTime;
</del><ins>+    m_lastGCLength = gcEndTime - gcStartTime;
</ins><span class="cx"> 
</span><span class="cx">     if (Options::recordGCPauseTimes())
</span><span class="cx">         HeapStatistics::recordGCPauseTime(gcStartTime, gcEndTime);
</span><span class="lines">@@ -1132,26 +1102,16 @@
</span><span class="cx">     m_objectSpace.forEachDeadCell&lt;MarkObject&gt;(iterationScope);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Heap::setFullActivityCallback(PassRefPtr&lt;FullGCActivityCallback&gt; activityCallback)
</del><ins>+void Heap::setActivityCallback(PassOwnPtr&lt;GCActivityCallback&gt; activityCallback)
</ins><span class="cx"> {
</span><del>-    m_fullActivityCallback = activityCallback;
</del><ins>+    m_activityCallback = activityCallback;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Heap::setEdenActivityCallback(PassRefPtr&lt;EdenGCActivityCallback&gt; activityCallback)
</del><ins>+GCActivityCallback* Heap::activityCallback()
</ins><span class="cx"> {
</span><del>-    m_edenActivityCallback = activityCallback;
</del><ins>+    return m_activityCallback.get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCActivityCallback* Heap::fullActivityCallback()
-{
-    return m_fullActivityCallback.get();
-}
-
-GCActivityCallback* Heap::edenActivityCallback()
-{
-    return m_edenActivityCallback.get();
-}
-
</del><span class="cx"> void Heap::setIncrementalSweeper(PassOwnPtr&lt;IncrementalSweeper&gt; sweeper)
</span><span class="cx"> {
</span><span class="cx">     m_sweeper = sweeper;
</span><span class="lines">@@ -1164,16 +1124,14 @@
</span><span class="cx"> 
</span><span class="cx"> void Heap::setGarbageCollectionTimerEnabled(bool enable)
</span><span class="cx"> {
</span><del>-    if (m_fullActivityCallback)
-        m_fullActivityCallback-&gt;setEnabled(enable);
-    if (m_edenActivityCallback)
-        m_edenActivityCallback-&gt;setEnabled(enable);
</del><ins>+    if (m_activityCallback)
+        m_activityCallback-&gt;setEnabled(enable);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Heap::didAllocate(size_t bytes)
</span><span class="cx"> {
</span><del>-    if (m_edenActivityCallback)
-        m_edenActivityCallback-&gt;didAllocate(m_bytesAllocatedThisCycle + m_bytesAbandonedSinceLastFullCollect);
</del><ins>+    if (m_activityCallback)
+        m_activityCallback-&gt;didAllocate(m_bytesAllocatedThisCycle + m_bytesAbandonedThisCycle);
</ins><span class="cx">     m_bytesAllocatedThisCycle += bytes;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1256,27 +1214,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Heap::shouldDoFullCollection(HeapOperation requestedCollectionType) const
</del><ins>+bool Heap::shouldDoFullCollection() const
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(GGC)
</span><del>-    if (Options::alwaysDoFullCollection())
-        return true;
-
-    switch (requestedCollectionType) {
-    case EdenCollection:
-        return false;
-    case FullCollection:
-        return true;
-    case AnyCollection:
-        return m_shouldDoFullCollection;
-    default:
-        RELEASE_ASSERT_NOT_REACHED();
-        return false;
-    }
-    RELEASE_ASSERT_NOT_REACHED();
-    return false;
</del><ins>+    return Options::alwaysDoFullCollection() || m_shouldDoFullCollection;
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(requestedCollectionType);
</del><span class="cx">     return true;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.h (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.h        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/Heap.h        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -52,8 +52,6 @@
</span><span class="cx">     class CopiedSpace;
</span><span class="cx">     class CodeBlock;
</span><span class="cx">     class ExecutableBase;
</span><del>-    class EdenGCActivityCallback;
-    class FullGCActivityCallback;
</del><span class="cx">     class GCActivityCallback;
</span><span class="cx">     class GCAwareJITStubRoutine;
</span><span class="cx">     class GlobalCodeBlock;
</span><span class="lines">@@ -120,10 +118,8 @@
</span><span class="cx">         MarkedSpace&amp; objectSpace() { return m_objectSpace; }
</span><span class="cx">         MachineThreads&amp; machineThreads() { return m_machineThreads; }
</span><span class="cx"> 
</span><del>-        JS_EXPORT_PRIVATE GCActivityCallback* fullActivityCallback();
-        JS_EXPORT_PRIVATE GCActivityCallback* edenActivityCallback();
-        JS_EXPORT_PRIVATE void setFullActivityCallback(PassRefPtr&lt;FullGCActivityCallback&gt;);
-        JS_EXPORT_PRIVATE void setEdenActivityCallback(PassRefPtr&lt;EdenGCActivityCallback&gt;);
</del><ins>+        JS_EXPORT_PRIVATE GCActivityCallback* activityCallback();
+        JS_EXPORT_PRIVATE void setActivityCallback(PassOwnPtr&lt;GCActivityCallback&gt;);
</ins><span class="cx">         JS_EXPORT_PRIVATE void setGarbageCollectionTimerEnabled(bool);
</span><span class="cx"> 
</span><span class="cx">         JS_EXPORT_PRIVATE IncrementalSweeper* sweeper();
</span><span class="lines">@@ -152,7 +148,9 @@
</span><span class="cx"> 
</span><span class="cx">         JS_EXPORT_PRIVATE void collectAllGarbage();
</span><span class="cx">         bool shouldCollect();
</span><del>-        JS_EXPORT_PRIVATE void collect(HeapOperation collectionType = AnyCollection);
</del><ins>+        void gcTimerDidFire() { m_shouldDoFullCollection = true; }
+        void setShouldDoFullCollection(bool shouldDoFullCollection) { m_shouldDoFullCollection = shouldDoFullCollection; }
+        JS_EXPORT_PRIVATE void collect();
</ins><span class="cx">         bool collectIfNecessaryOrDefer(); // Returns true if it did collect.
</span><span class="cx"> 
</span><span class="cx">         void reportExtraMemoryCost(size_t cost);
</span><span class="lines">@@ -188,15 +186,9 @@
</span><span class="cx">         void didFinishIterating();
</span><span class="cx">         void getConservativeRegisterRoots(HashSet&lt;JSCell*&gt;&amp; roots);
</span><span class="cx"> 
</span><del>-        double lastFullGCLength() const { return m_lastFullGCLength; }
-        double lastEdenGCLength() const { return m_lastEdenGCLength; }
-        void increaseLastFullGCLength(double amount) { m_lastFullGCLength += amount; }
</del><ins>+        double lastGCLength() { return m_lastGCLength; }
+        void increaseLastGCLength(double amount) { m_lastGCLength += amount; }
</ins><span class="cx"> 
</span><del>-        size_t sizeBeforeLastEdenCollection() const { return m_sizeBeforeLastEdenCollect; }
-        size_t sizeAfterLastEdenCollection() const { return m_sizeAfterLastEdenCollect; }
-        size_t sizeBeforeLastFullCollection() const { return m_sizeBeforeLastFullCollect; }
-        size_t sizeAfterLastFullCollection() const { return m_sizeAfterLastFullCollect; }
-
</del><span class="cx">         JS_EXPORT_PRIVATE void deleteAllCompiledCode();
</span><span class="cx">         void deleteAllUnlinkedFunctionCode();
</span><span class="cx"> 
</span><span class="lines">@@ -260,7 +252,7 @@
</span><span class="cx">         JS_EXPORT_PRIVATE void reportExtraMemoryCostSlowCase(size_t);
</span><span class="cx"> 
</span><span class="cx">         void suspendCompilerThreads();
</span><del>-        void willStartCollection(HeapOperation collectionType);
</del><ins>+        void willStartCollection();
</ins><span class="cx">         void deleteOldCode(double gcStartTime);
</span><span class="cx">         void flushOldStructureIDTables();
</span><span class="cx">         void flushWriteBarrierBuffer();
</span><span class="lines">@@ -304,7 +296,7 @@
</span><span class="cx">         void zombifyDeadObjects();
</span><span class="cx">         void markDeadObjects();
</span><span class="cx"> 
</span><del>-        bool shouldDoFullCollection(HeapOperation requestedCollectionType) const;
</del><ins>+        bool shouldDoFullCollection() const;
</ins><span class="cx">         size_t sizeAfterCollect();
</span><span class="cx"> 
</span><span class="cx">         JSStack&amp; stack();
</span><span class="lines">@@ -317,13 +309,9 @@
</span><span class="cx">         const size_t m_ramSize;
</span><span class="cx">         const size_t m_minBytesPerCycle;
</span><span class="cx">         size_t m_sizeAfterLastCollect;
</span><del>-        size_t m_sizeAfterLastFullCollect;
-        size_t m_sizeBeforeLastFullCollect;
-        size_t m_sizeAfterLastEdenCollect;
-        size_t m_sizeBeforeLastEdenCollect;
</del><span class="cx"> 
</span><span class="cx">         size_t m_bytesAllocatedThisCycle;
</span><del>-        size_t m_bytesAbandonedSinceLastFullCollect;
</del><ins>+        size_t m_bytesAbandonedThisCycle;
</ins><span class="cx">         size_t m_maxEdenSize;
</span><span class="cx">         size_t m_maxHeapSize;
</span><span class="cx">         bool m_shouldDoFullCollection;
</span><span class="lines">@@ -361,14 +349,12 @@
</span><span class="cx">         WriteBarrierBuffer m_writeBarrierBuffer;
</span><span class="cx"> 
</span><span class="cx">         VM* m_vm;
</span><del>-        double m_lastFullGCLength;
-        double m_lastEdenGCLength;
</del><ins>+        double m_lastGCLength;
</ins><span class="cx">         double m_lastCodeDiscardTime;
</span><span class="cx"> 
</span><span class="cx">         DoublyLinkedList&lt;ExecutableBase&gt; m_compiledCode;
</span><span class="cx">         
</span><del>-        RefPtr&lt;GCActivityCallback&gt; m_fullActivityCallback;
-        RefPtr&lt;GCActivityCallback&gt; m_edenActivityCallback;
</del><ins>+        OwnPtr&lt;GCActivityCallback&gt; m_activityCallback;
</ins><span class="cx">         OwnPtr&lt;IncrementalSweeper&gt; m_sweeper;
</span><span class="cx">         Vector&lt;MarkedBlock*&gt; m_blockSnapshot;
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapOperationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapOperation.h (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapOperation.h        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/HeapOperation.h        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-enum HeapOperation { NoOperation, Allocation, FullCollection, EdenCollection, AnyCollection };
</del><ins>+enum HeapOperation { NoOperation, Allocation, FullCollection, EdenCollection };
</ins><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapStatisticscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapStatistics.cpp (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapStatistics.cpp        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/HeapStatistics.cpp        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx">     dataLogF(&quot;\n=== Heap Statistics: ===\n&quot;);
</span><span class="cx">     dataLogF(&quot;size: %ldkB\n&quot;, static_cast&lt;long&gt;(heap-&gt;m_sizeAfterLastCollect / KB));
</span><span class="cx">     dataLogF(&quot;capacity: %ldkB\n&quot;, static_cast&lt;long&gt;(heap-&gt;capacity() / KB));
</span><del>-    dataLogF(&quot;pause time: %lfms\n\n&quot;, heap-&gt;m_lastFullGCLength);
</del><ins>+    dataLogF(&quot;pause time: %lfms\n\n&quot;, heap-&gt;m_lastGCLength);
</ins><span class="cx"> 
</span><span class="cx">     StorageStatistics storageStatistics;
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapTimercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapTimer.cpp (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapTimer.cpp        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/heap/HeapTimer.cpp        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -85,10 +85,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     HeapTimer* heapTimer = 0;
</span><del>-    if (vm-&gt;heap.fullActivityCallback() &amp;&amp; vm-&gt;heap.fullActivityCallback()-&gt;m_timer.get() == timer)
-        heapTimer = vm-&gt;heap.fullActivityCallback();
-    else if (vm-&gt;heap.edenActivityCallback() &amp;&amp; vm-&gt;heap.edenActivityCallback()-&gt;m_timer.get() == timer)
-        heapTimer = vm-&gt;heap.edenActivityCallback();
</del><ins>+    if (vm-&gt;heap.activityCallback() &amp;&amp; vm-&gt;heap.activityCallback()-&gt;m_timer.get() == timer)
+        heapTimer = vm-&gt;heap.activityCallback();
</ins><span class="cx">     else if (vm-&gt;heap.sweeper()-&gt;m_timer.get() == timer)
</span><span class="cx">         heapTimer = vm-&gt;heap.sweeper();
</span><span class="cx">     else
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejsccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jsc.cpp (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jsc.cpp        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/jsc.cpp        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -577,14 +577,18 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL functionFullGC(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     JSLockHolder lock(exec);
</span><del>-    exec-&gt;heap()-&gt;collect(FullCollection);
</del><ins>+    Heap* heap = exec-&gt;heap();
+    heap-&gt;setShouldDoFullCollection(true);
+    exec-&gt;heap()-&gt;collect();
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL functionEdenGC(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     JSLockHolder lock(exec);
</span><del>-    exec-&gt;heap()-&gt;collect(EdenCollection);
</del><ins>+    Heap* heap = exec-&gt;heap();
+    heap-&gt;setShouldDoFullCollection(false);
+    heap-&gt;collect();
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Options.h (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Options.h        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/JavaScriptCore/runtime/Options.h        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -242,10 +242,6 @@
</span><span class="cx">     v(double, minCopiedBlockUtilization, 0.9) \
</span><span class="cx">     v(double, minMarkedBlockUtilization, 0.9) \
</span><span class="cx">     \
</span><del>-    v(double, percentCPUPerMBForFullTimer, 0.0003125) \
-    v(double, percentCPUPerMBForEdenTimer, 0.0025) \
-    v(double, collectionTimerMaxPercentCPU, 0.05) \
-    \
</del><span class="cx">     v(bool, forceWeakRandomSeed, false) \
</span><span class="cx">     v(unsigned, forcedWeakRandomSeed, 0) \
</span><span class="cx">     \
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/WebCore/ChangeLog        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2014-03-19  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        Unreviewed, rolling out r165926.
+        https://bugs.webkit.org/show_bug.cgi?id=130488
+
+        broke the iOS build (Requested by estes on #webkit).
+
+        Reverted changeset:
+
+        &quot;GC timer should intelligently choose between EdenCollections
+        and FullCollections&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=128261
+        http://trac.webkit.org/changeset/165926
+
+2014-03-19  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
</ins><span class="cx">         Unreviewed, rolling out r165929.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=130487
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebSafeGCActivityCallbackIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebSafeGCActivityCallbackIOS.h (165932 => 165933)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebSafeGCActivityCallbackIOS.h        2014-03-20 00:13:25 UTC (rev 165932)
+++ trunk/Source/WebCore/platform/ios/WebSafeGCActivityCallbackIOS.h        2014-03-20 00:18:26 UTC (rev 165933)
</span><span class="lines">@@ -27,42 +27,26 @@
</span><span class="cx"> #define WebSafeGCActivityCallbackIOS_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WebCoreThread.h&quot;
</span><del>-#include &lt;JavaScriptCore/EdenGCActivityCallback.h&gt;
-#include &lt;JavaScriptCore/FullGCActivityCallback.h&gt;
</del><ins>+#include &lt;JavaScriptCore/GCActivityCallback.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class WebSafeFullGCActivityCallback final : public JSC::FullGCActivityCallback {
</del><ins>+class WebSafeGCActivityCallback final : public JSC::DefaultGCActivityCallback {
</ins><span class="cx"> public:
</span><del>-    static PassOwnPtr&lt;WebSafeFullGCActivityCallback&gt; create(JSC::Heap* heap)
</del><ins>+    static PassOwnPtr&lt;WebSafeGCActivityCallback&gt; create(JSC::Heap* heap)
</ins><span class="cx">     {
</span><del>-        return adoptPtr(new WebSafeFullGCActivityCallback(heap));
</del><ins>+        return adoptPtr(new WebSafeGCActivityCallback(heap));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    virtual ~WebSafeFullGCActivityCallback() override { }
</del><ins>+    virtual ~WebSafeGCActivityCallback() override { }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WebSafeFullGCActivityCallback(JSC::Heap* heap)
-        : JSC::FullGCActivityCallback(heap, WebThreadRunLoop())
</del><ins>+    WebSafeGCActivityCallback(JSC::Heap* heap)
+        : JSC::DefaultGCActivityCallback(heap, WebThreadRunLoop())
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class WebSafeEdenGCActivityCallback final : public JSC::EdenGCActivityCallback {
-public:
-    static PassOwnPtr&lt;WebSafeEdenGCActivityCallback&gt; create(JSC::Heap* heap)
-    {
-        return adoptPtr(new WebSafeEdenGCActivityCallback(heap));
-    }
-
-    virtual ~WebSafeEdenGCActivityCallback() override { }
-
-private:
-    WebSafeEdenGCActivityCallback(JSC::Heap* heap)
-        : JSC::EdenGCActivityCallback(heap, WebThreadRunLoop())
-    {
-    }
-};
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // WebSafeGCActivityCallbackIOS_h
</span></span></pre>
</div>
</div>

</body>
</html>