#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 {
};
class GCThreadSharedData {
+ WTF_MAKE_FAST_ALLOCATED;
public:
GCThreadSharedData(VM*);
~GCThreadSharedData();
#if ENABLE(PARALLEL_GC)
void resetChildren();
size_t childVisitCount();
+ size_t childBytesVisited();
+ size_t childBytesCopied();
size_t childDupStrings();
#endif
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;
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;