]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - heap/GCThreadSharedData.h
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / heap / GCThreadSharedData.h
index 47a53ebd8bad983fc3d721911bfd4791d32427c9..32c06bda347f375c6478fefd915920a65e12a746 100644 (file)
@@ -31,9 +31,9 @@
 #include "MarkedBlock.h"
 #include "UnconditionalFinalizer.h"
 #include "WeakReferenceHarvester.h"
+#include <condition_variable>
 #include <wtf/HashSet.h>
 #include <wtf/TCSpinLock.h>
-#include <wtf/Threading.h>
 #include <wtf/Vector.h>
 
 namespace JSC {
@@ -51,6 +51,7 @@ enum GCPhase {
 };
 
 class GCThreadSharedData {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     GCThreadSharedData(VM*);
     ~GCThreadSharedData();
@@ -65,6 +66,8 @@ public:
 #if ENABLE(PARALLEL_GC)
     void resetChildren();
     size_t childVisitCount();
+    size_t childBytesVisited();
+    size_t childBytesCopied();
     size_t childDupStrings();
 #endif
     
@@ -84,13 +87,13 @@ private:
 
     Vector<GCThread*> m_gcThreads;
 
-    Mutex m_markingLock;
-    ThreadCondition m_markingCondition;
+    std::mutex m_markingMutex;
+    std::condition_variable m_markingConditionVariable;
     MarkStackArray m_sharedMarkStack;
     unsigned m_numberOfActiveParallelMarkers;
     bool m_parallelMarkersShouldExit;
 
-    Mutex m_opaqueRootsLock;
+    std::mutex m_opaqueRootsMutex;
     HashSet<void*> m_opaqueRoots;
 
     SpinLock m_copyLock;
@@ -98,9 +101,9 @@ private:
     size_t m_copyIndex;
     static const size_t s_blockFragmentLength = 32;
 
-    Mutex m_phaseLock;
-    ThreadCondition m_phaseCondition;
-    ThreadCondition m_activityCondition;
+    std::mutex m_phaseMutex;
+    std::condition_variable m_phaseConditionVariable;
+    std::condition_variable m_activityConditionVariable;
     unsigned m_numberOfActiveGCThreads;
     bool m_gcThreadsShouldWait;
     GCPhase m_currentPhase;