<!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>[190131] 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/190131">190131</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-09-22 13:41:25 -0700 (Tue, 22 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Get rid of ENABLE(PARALLEL_GC)
https://bugs.webkit.org/show_bug.cgi?id=149436

Reviewed by Mark Lam.

We always enable parallel GC everywhere but Windows, and it doesn't look like it was disabled
there for any good reason. So, get rid of the flag.

Source/JavaScriptCore:

The only effect of this change is that parallel GC will now be enabled on Windows, provided
that the CPU detection finds more than one.

* heap/GCThread.cpp:
(JSC::GCThread::gcThreadMain):
* heap/GCThreadSharedData.cpp:
(JSC::GCThreadSharedData::resetChildren):
(JSC::GCThreadSharedData::childBytesCopied):
(JSC::GCThreadSharedData::GCThreadSharedData):
(JSC::GCThreadSharedData::~GCThreadSharedData):
(JSC::GCThreadSharedData::reset):
(JSC::GCThreadSharedData::didStartMarking):
* heap/Heap.cpp:
(JSC::Heap::converge):
(JSC::Heap::visitWeakHandles):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::resetVisitors):
* heap/MarkedBlock.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::reset):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::mergeOpaqueRoots):
(JSC::JSString::tryHashConsLock):
(JSC::JSString::releaseHashConsLock):
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::addOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRootTriState):
(JSC::SlotVisitor::opaqueRootCount):
(JSC::SlotVisitor::mergeOpaqueRootsIfNecessary):
* runtime/Options.cpp:
(JSC::computeNumberOfGCMarkers):

Source/WTF:

* wtf/MainThread.cpp:
(WTF::canAccessThreadLocalDataForThread):
(WTF::initializeGCThreads):
(WTF::registerGCThread):
(WTF::isMainThreadOrGCThread):
* wtf/Platform.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapGCThreadcpp">trunk/Source/JavaScriptCore/heap/GCThread.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapGCThreadSharedDatacpp">trunk/Source/JavaScriptCore/heap/GCThreadSharedData.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapGCThreadSharedDatah">trunk/Source/JavaScriptCore/heap/GCThreadSharedData.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapcpp">trunk/Source/JavaScriptCore/heap/Heap.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMarkedBlockh">trunk/Source/JavaScriptCore/heap/MarkedBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapSlotVisitorcpp">trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapSlotVisitorInlinesh">trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOptionscpp">trunk/Source/JavaScriptCore/runtime/Options.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfMainThreadcpp">trunk/Source/WTF/wtf/MainThread.cpp</a></li>
<li><a href="#trunkSourceWTFwtfMainThreadh">trunk/Source/WTF/wtf/MainThread.h</a></li>
<li><a href="#trunkSourceWTFwtfPlatformh">trunk/Source/WTF/wtf/Platform.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2015-09-22  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Get rid of ENABLE(PARALLEL_GC)
+        https://bugs.webkit.org/show_bug.cgi?id=149436
+
+        Reviewed by Mark Lam.
+
+        We always enable parallel GC everywhere but Windows, and it doesn't look like it was disabled
+        there for any good reason. So, get rid of the flag.
+
+        The only effect of this change is that parallel GC will now be enabled on Windows, provided
+        that the CPU detection finds more than one.
+
+        * heap/GCThread.cpp:
+        (JSC::GCThread::gcThreadMain):
+        * heap/GCThreadSharedData.cpp:
+        (JSC::GCThreadSharedData::resetChildren):
+        (JSC::GCThreadSharedData::childBytesCopied):
+        (JSC::GCThreadSharedData::GCThreadSharedData):
+        (JSC::GCThreadSharedData::~GCThreadSharedData):
+        (JSC::GCThreadSharedData::reset):
+        (JSC::GCThreadSharedData::didStartMarking):
+        * heap/Heap.cpp:
+        (JSC::Heap::converge):
+        (JSC::Heap::visitWeakHandles):
+        (JSC::Heap::updateObjectCounts):
+        (JSC::Heap::resetVisitors):
+        * heap/MarkedBlock.h:
+        * heap/SlotVisitor.cpp:
+        (JSC::SlotVisitor::didStartMarking):
+        (JSC::SlotVisitor::reset):
+        (JSC::SlotVisitor::drain):
+        (JSC::SlotVisitor::drainFromShared):
+        (JSC::SlotVisitor::mergeOpaqueRoots):
+        (JSC::JSString::tryHashConsLock):
+        (JSC::JSString::releaseHashConsLock):
+        * heap/SlotVisitorInlines.h:
+        (JSC::SlotVisitor::addOpaqueRoot):
+        (JSC::SlotVisitor::containsOpaqueRoot):
+        (JSC::SlotVisitor::containsOpaqueRootTriState):
+        (JSC::SlotVisitor::opaqueRootCount):
+        (JSC::SlotVisitor::mergeOpaqueRootsIfNecessary):
+        * runtime/Options.cpp:
+        (JSC::computeNumberOfGCMarkers):
+
</ins><span class="cx"> 2015-09-22  Sukolsak Sakshuwong  &lt;sukolsak@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Implement min and max instructions in WebAssembly
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/GCThread.cpp (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCThread.cpp        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/heap/GCThread.cpp        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -84,9 +84,7 @@
</span><span class="cx"> void GCThread::gcThreadMain()
</span><span class="cx"> {
</span><span class="cx">     GCPhase currentPhase;
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     WTF::registerGCThread();
</span><del>-#endif
</del><span class="cx">     // Wait for the main thread to finish creating and initializing us. The main thread grabs this lock before 
</span><span class="cx">     // creating this thread. We aren't guaranteed to have a valid threadID until the main thread releases this lock.
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCThreadSharedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/GCThreadSharedData.cpp (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCThreadSharedData.cpp        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/heap/GCThreadSharedData.cpp        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx"> void GCThreadSharedData::resetChildren()
</span><span class="cx"> {
</span><span class="cx">     for (size_t i = 0; i &lt; m_gcThreads.size(); ++i)
</span><span class="lines">@@ -67,7 +66,6 @@
</span><span class="cx">         result += m_gcThreads[i]-&gt;slotVisitor()-&gt;bytesCopied();
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx"> GCThreadSharedData::GCThreadSharedData(VM* vm)
</span><span class="cx">     : m_vm(vm)
</span><span class="lines">@@ -81,7 +79,6 @@
</span><span class="cx">     , m_gcThreadsShouldWait(false)
</span><span class="cx">     , m_currentPhase(NoPhase)
</span><span class="cx"> {
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     // Grab the lock so the new GC threads can be properly initialized before they start running.
</span><span class="cx">     std::unique_lock&lt;Lock&gt; lock(m_phaseMutex);
</span><span class="cx">     for (unsigned i = 1; i &lt; Options::numberOfGCMarkers(); ++i) {
</span><span class="lines">@@ -94,12 +91,10 @@
</span><span class="cx"> 
</span><span class="cx">     // Wait for all the GCThreads to get to the right place.
</span><span class="cx">     m_activityConditionVariable.wait(lock, [this] { return !m_numberOfActiveGCThreads; });
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GCThreadSharedData::~GCThreadSharedData()
</span><span class="cx"> {
</span><del>-#if ENABLE(PARALLEL_GC)    
</del><span class="cx">     // Destroy our marking threads.
</span><span class="cx">     {
</span><span class="cx">         std::lock_guard&lt;Lock&gt; markingLock(m_markingMutex);
</span><span class="lines">@@ -114,7 +109,6 @@
</span><span class="cx">         waitForThreadCompletion(m_gcThreads[i]-&gt;threadID());
</span><span class="cx">         delete m_gcThreads[i];
</span><span class="cx">     }
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GCThreadSharedData::reset()
</span><span class="lines">@@ -151,13 +145,8 @@
</span><span class="cx"> 
</span><span class="cx"> void GCThreadSharedData::didStartMarking()
</span><span class="cx"> {
</span><del>-    if (m_vm-&gt;heap.operationInProgress() == FullCollection) {
-#if ENABLE(PARALLEL_GC)
</del><ins>+    if (m_vm-&gt;heap.operationInProgress() == FullCollection)
</ins><span class="cx">         m_opaqueRoots.clear();
</span><del>-#else
-        ASSERT(m_opaqueRoots.isEmpty());
-#endif
-}
</del><span class="cx">     std::lock_guard&lt;Lock&gt; lock(m_markingMutex);
</span><span class="cx">     m_parallelMarkersShouldExit = false;
</span><span class="cx">     startNextPhase(Mark);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCThreadSharedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/GCThreadSharedData.h (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCThreadSharedData.h        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/heap/GCThreadSharedData.h        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -65,13 +65,11 @@
</span><span class="cx">     void didStartCopying();
</span><span class="cx">     void didFinishCopying();
</span><span class="cx"> 
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     void resetChildren();
</span><span class="cx">     size_t childVisitCount();
</span><span class="cx">     size_t childBytesVisited();
</span><span class="cx">     size_t childBytesCopied();
</span><span class="cx">     size_t childDupStrings();
</span><del>-#endif
</del><span class="cx">     
</span><span class="cx"> private:
</span><span class="cx">     friend class GCThread;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.cpp (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.cpp        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/heap/Heap.cpp        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -753,10 +753,8 @@
</span><span class="cx"> 
</span><span class="cx"> void Heap::converge()
</span><span class="cx"> {
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     GCPHASE(Convergence);
</span><span class="cx">     m_slotVisitor.drainFromShared(SlotVisitor::MasterDrain);
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Heap::visitWeakHandles(HeapRootVisitor&amp; visitor)
</span><span class="lines">@@ -775,9 +773,7 @@
</span><span class="cx">         {
</span><span class="cx">             ParallelModeEnabler enabler(m_slotVisitor);
</span><span class="cx">             m_slotVisitor.donateAndDrain();
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">             m_slotVisitor.drainFromShared(SlotVisitor::MasterDrain);
</span><del>-#endif
</del><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -795,9 +791,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (Options::logGC() == GCLogging::Verbose) {
</span><span class="cx">         size_t visitCount = m_slotVisitor.visitCount();
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">         visitCount += m_sharedData.childVisitCount();
</span><del>-#endif
</del><span class="cx">         dataLogF(&quot;\nNumber of live Objects after GC %lu, took %.6f secs\n&quot;, static_cast&lt;unsigned long&gt;(visitCount), WTF::monotonicallyIncreasingTime() - gcStartTime);
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -812,18 +806,14 @@
</span><span class="cx">     
</span><span class="cx">     m_totalBytesVisited += m_slotVisitor.bytesVisited();
</span><span class="cx">     m_totalBytesCopied += m_slotVisitor.bytesCopied();
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     m_totalBytesVisited += m_sharedData.childBytesVisited();
</span><span class="cx">     m_totalBytesCopied += m_sharedData.childBytesCopied();
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Heap::resetVisitors()
</span><span class="cx"> {
</span><span class="cx">     m_slotVisitor.reset();
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     m_sharedData.resetChildren();
</span><del>-#endif
</del><span class="cx">     m_sharedData.reset();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMarkedBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MarkedBlock.h (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MarkedBlock.h        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/heap/MarkedBlock.h        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -195,11 +195,7 @@
</span><span class="cx"> 
</span><span class="cx">         size_t m_atomsPerCell;
</span><span class="cx">         size_t m_endAtom; // This is a fuzzy end. Always test for &lt; m_endAtom.
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">         WTF::Bitmap&lt;atomsPerBlock, WTF::BitmapAtomic, uint8_t&gt; m_marks;
</span><del>-#else
-        WTF::Bitmap&lt;atomsPerBlock, WTF::BitmapNotAtomic, uint8_t&gt; m_marks;
-#endif
</del><span class="cx">         std::unique_ptr&lt;WTF::Bitmap&lt;atomsPerBlock&gt;&gt; m_newlyAllocated;
</span><span class="cx"> 
</span><span class="cx">         size_t m_capacity;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapSlotVisitorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -64,20 +64,13 @@
</span><span class="cx"> 
</span><span class="cx"> void SlotVisitor::didStartMarking()
</span><span class="cx"> {
</span><del>-    if (heap()-&gt;operationInProgress() == FullCollection) {
-#if ENABLE(PARALLEL_GC)
</del><ins>+    if (heap()-&gt;operationInProgress() == FullCollection)
</ins><span class="cx">         ASSERT(m_opaqueRoots.isEmpty()); // Should have merged by now.
</span><del>-#else
-        m_opaqueRoots.clear();
-#endif
-    }
</del><span class="cx"> 
</span><span class="cx">     m_shared.m_shouldHashCons = m_shared.m_vm-&gt;haveEnoughNewStringsToHashCons();
</span><span class="cx">     m_shouldHashCons = m_shared.m_shouldHashCons;
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     for (unsigned i = 0; i &lt; m_shared.m_gcThreads.size(); ++i)
</span><span class="cx">         m_shared.m_gcThreads[i]-&gt;slotVisitor()-&gt;m_shouldHashCons = m_shared.m_shouldHashCons;
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SlotVisitor::reset()
</span><span class="lines">@@ -163,7 +156,6 @@
</span><span class="cx">     StackStats::probe();
</span><span class="cx">     ASSERT(m_isInParallelMode);
</span><span class="cx">    
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     if (Options::numberOfGCMarkers() &gt; 1) {
</span><span class="cx">         while (!m_stack.isEmpty()) {
</span><span class="cx">             m_stack.refill();
</span><span class="lines">@@ -175,7 +167,6 @@
</span><span class="cx">         mergeOpaqueRootsIfNecessary();
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-#endif
</del><span class="cx">     
</span><span class="cx">     while (!m_stack.isEmpty()) {
</span><span class="cx">         m_stack.refill();
</span><span class="lines">@@ -193,12 +184,7 @@
</span><span class="cx">     
</span><span class="cx">     bool shouldBeParallel;
</span><span class="cx"> 
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     shouldBeParallel = Options::numberOfGCMarkers() &gt; 1;
</span><del>-#else
-    ASSERT(Options::numberOfGCMarkers() == 1);
-    shouldBeParallel = false;
-#endif
</del><span class="cx">     
</span><span class="cx">     if (!shouldBeParallel) {
</span><span class="cx">         // This call should be a no-op.
</span><span class="lines">@@ -208,7 +194,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     {
</span><span class="cx">         std::lock_guard&lt;Lock&gt; lock(m_shared.m_markingMutex);
</span><span class="cx">         m_shared.m_numberOfActiveParallelMarkers++;
</span><span class="lines">@@ -258,7 +243,6 @@
</span><span class="cx">         
</span><span class="cx">         drain();
</span><span class="cx">     }
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SlotVisitor::mergeOpaqueRoots()
</span><span class="lines">@@ -275,7 +259,6 @@
</span><span class="cx"> 
</span><span class="cx"> ALWAYS_INLINE bool JSString::tryHashConsLock()
</span><span class="cx"> {
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     unsigned currentFlags = m_flags;
</span><span class="cx"> 
</span><span class="cx">     if (currentFlags &amp; HashConsLock)
</span><span class="lines">@@ -288,21 +271,11 @@
</span><span class="cx"> 
</span><span class="cx">     WTF::memoryBarrierAfterLock();
</span><span class="cx">     return true;
</span><del>-#else
-    if (isHashConsSingleton())
-        return false;
-
-    m_flags |= HashConsLock;
-
-    return true;
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ALWAYS_INLINE void JSString::releaseHashConsLock()
</span><span class="cx"> {
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     WTF::memoryBarrierBeforeUnlock();
</span><del>-#endif
</del><span class="cx">     m_flags &amp;= ~HashConsLock;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapSlotVisitorInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -158,7 +158,6 @@
</span><span class="cx"> 
</span><span class="cx"> inline void SlotVisitor::addOpaqueRoot(void* root)
</span><span class="cx"> {
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     if (Options::numberOfGCMarkers() == 1) {
</span><span class="cx">         // Put directly into the shared HashSet.
</span><span class="cx">         m_shared.m_opaqueRoots.add(root);
</span><span class="lines">@@ -168,20 +167,13 @@
</span><span class="cx">     // a while to make sure that the local sets don't grow too large.
</span><span class="cx">     mergeOpaqueRootsIfProfitable();
</span><span class="cx">     m_opaqueRoots.add(root);
</span><del>-#else
-    m_opaqueRoots.add(root);
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool SlotVisitor::containsOpaqueRoot(void* root) const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_isInParallelMode);
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     ASSERT(m_opaqueRoots.isEmpty());
</span><span class="cx">     return m_shared.m_opaqueRoots.contains(root);
</span><del>-#else
-    return m_opaqueRoots.contains(root);
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline TriState SlotVisitor::containsOpaqueRootTriState(void* root) const
</span><span class="lines">@@ -197,12 +189,8 @@
</span><span class="cx"> inline int SlotVisitor::opaqueRootCount()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_isInParallelMode);
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     ASSERT(m_opaqueRoots.isEmpty());
</span><span class="cx">     return m_shared.m_opaqueRoots.size();
</span><del>-#else
-    return m_opaqueRoots.size();
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void SlotVisitor::mergeOpaqueRootsIfNecessary()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOptionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Options.cpp (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Options.cpp        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/JavaScriptCore/runtime/Options.cpp        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> #include &lt;wtf/StringExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><del>-#if OS(DARWIN) &amp;&amp; ENABLE(PARALLEL_GC)
</del><ins>+#if OS(DARWIN)
</ins><span class="cx"> #include &lt;sys/sysctl.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -148,12 +148,7 @@
</span><span class="cx"> 
</span><span class="cx"> static unsigned computeNumberOfGCMarkers(unsigned maxNumberOfGCMarkers)
</span><span class="cx"> {
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     return computeNumberOfWorkerThreads(maxNumberOfGCMarkers);
</span><del>-#else
-    UNUSED_PARAM(maxNumberOfGCMarkers);
-    return 1;
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const char* const OptionRange::s_nullRangeStr = &quot;&lt;null&gt;&quot;;
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/WTF/ChangeLog        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -1,5 +1,22 @@
</span><span class="cx"> 2015-09-22  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Get rid of ENABLE(PARALLEL_GC)
+        https://bugs.webkit.org/show_bug.cgi?id=149436
+
+        Reviewed by Mark Lam.
+
+        We always enable parallel GC everywhere but Windows, and it doesn't look like it was disabled
+        there for any good reason. So, get rid of the flag.
+
+        * wtf/MainThread.cpp:
+        (WTF::canAccessThreadLocalDataForThread):
+        (WTF::initializeGCThreads):
+        (WTF::registerGCThread):
+        (WTF::isMainThreadOrGCThread):
+        * wtf/Platform.h:
+
+2015-09-22  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
</ins><span class="cx">         Get rid of ENABLE(GGC)
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=149472
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFwtfMainThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/MainThread.cpp (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/MainThread.cpp        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/WTF/wtf/MainThread.cpp        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -187,18 +187,13 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx"> static ThreadSpecific&lt;bool&gt;* isGCThread;
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx"> void initializeGCThreads()
</span><span class="cx"> {
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx">     isGCThread = new ThreadSpecific&lt;bool&gt;();
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(PARALLEL_GC)
</del><span class="cx"> void registerGCThread()
</span><span class="cx"> {
</span><span class="cx">     if (!isGCThread) {
</span><span class="lines">@@ -217,12 +212,5 @@
</span><span class="cx"> 
</span><span class="cx">     return isMainThread();
</span><span class="cx"> }
</span><del>-#elif OS(DARWIN) &amp;&amp; !PLATFORM(EFL) &amp;&amp; !PLATFORM(GTK)
-// This is necessary because JavaScriptCore.exp doesn't support preprocessor macros.
-bool isMainThreadOrGCThread()
-{
-    return isMainThread();
-}
-#endif
</del><span class="cx"> 
</span><span class="cx"> } // namespace WTF
</span></span></pre></div>
<a id="trunkSourceWTFwtfMainThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/MainThread.h (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/MainThread.h        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/WTF/wtf/MainThread.h        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -66,14 +66,8 @@
</span><span class="cx"> 
</span><span class="cx"> void initializeGCThreads();
</span><span class="cx"> 
</span><del>-#if ENABLE(PARALLEL_GC)
-void registerGCThread();
</del><ins>+WTF_EXPORT_PRIVATE void registerGCThread();
</ins><span class="cx"> WTF_EXPORT_PRIVATE bool isMainThreadOrGCThread();
</span><del>-#elif OS(DARWIN) &amp;&amp; !PLATFORM(EFL) &amp;&amp; !PLATFORM(GTK)
-WTF_EXPORT_PRIVATE bool isMainThreadOrGCThread();
-#else
-inline bool isMainThreadOrGCThread() { return isMainThread(); }
-#endif
</del><span class="cx"> 
</span><span class="cx"> // NOTE: these functions are internal to the callOnMainThread implementation.
</span><span class="cx"> void initializeMainThreadPlatform();
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Platform.h (190130 => 190131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Platform.h        2015-09-22 20:11:45 UTC (rev 190130)
+++ trunk/Source/WTF/wtf/Platform.h        2015-09-22 20:41:25 UTC (rev 190131)
</span><span class="lines">@@ -963,10 +963,6 @@
</span><span class="cx"> #define USE_IMLANG_FONT_LINK2 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !defined(ENABLE_PARALLEL_GC) &amp;&amp; (OS(DARWIN) || PLATFORM(EFL) || PLATFORM(GTK))
-#define ENABLE_PARALLEL_GC 1
-#endif
-
</del><span class="cx"> #if !defined(ENABLE_GC_VALIDATION) &amp;&amp; !defined(NDEBUG)
</span><span class="cx"> #define ENABLE_GC_VALIDATION 1
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>