Title: [227914] branches/safari-605-branch/Source

Diff

Modified: branches/safari-605-branch/Source/_javascript_Core/ChangeLog (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/ChangeLog	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/ChangeLog	2018-01-31 19:21:55 UTC (rev 227914)
@@ -1,3 +1,31 @@
+2018-01-31  Jason Marcell  <[email protected]>
+
+        Cherry-pick r227683. rdar://problem/37019334
+
+    2018-01-26  Filip Pizlo  <[email protected]>
+
+            Disable TLS-based TLCs
+            https://bugs.webkit.org/show_bug.cgi?id=182175
+
+            Reviewed by Saam Barati.
+
+            Check for the new USE(FAST_TLS_FOR_TLC) flag instead of just ENABLE(FAST_TLS_JIT).
+
+            * heap/BlockDirectory.cpp:
+            (JSC::BlockDirectory::~BlockDirectory):
+            * heap/BlockDirectory.h:
+            * heap/ThreadLocalCache.cpp:
+            (JSC::ThreadLocalCache::installSlow):
+            (JSC::ThreadLocalCache::installData):
+            * heap/ThreadLocalCache.h:
+            * heap/ThreadLocalCacheInlines.h:
+            (JSC::ThreadLocalCache::getImpl):
+            * jit/AssemblyHelpers.cpp:
+            (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):
+            * runtime/VM.cpp:
+            (JSC::VM::~VM):
+            * runtime/VM.h:
+
 2018-01-30  Jason Marcell  <[email protected]>
 
         Cherry-pick r227617. rdar://problem/37019352

Modified: branches/safari-605-branch/Source/_javascript_Core/heap/BlockDirectory.cpp (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/heap/BlockDirectory.cpp	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/heap/BlockDirectory.cpp	2018-01-31 19:21:55 UTC (rev 227914)
@@ -45,6 +45,10 @@
     heap->threadLocalCacheLayout().allocateOffset(this);
 }
 
+BlockDirectory::~BlockDirectory()
+{
+}
+
 void BlockDirectory::setSubspace(Subspace* subspace)
 {
     m_attributes = subspace->attributes();

Modified: branches/safari-605-branch/Source/_javascript_Core/heap/BlockDirectory.h (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/heap/BlockDirectory.h	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/heap/BlockDirectory.h	2018-01-31 19:21:55 UTC (rev 227914)
@@ -80,6 +80,7 @@
 
 public:
     BlockDirectory(Heap*, size_t cellSize);
+    ~BlockDirectory();
     void setSubspace(Subspace*);
     void lastChanceToFinalize();
     void prepareForAllocation();

Modified: branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCache.cpp (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCache.cpp	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCache.cpp	2018-01-31 19:21:55 UTC (rev 227914)
@@ -72,7 +72,7 @@
 
 void ThreadLocalCache::installSlow(VM& vm)
 {
-#if ENABLE(FAST_TLS_JIT)
+#if USE(FAST_TLS_FOR_TLC)
     static std::once_flag onceFlag;
     std::call_once(
         onceFlag,
@@ -91,7 +91,7 @@
 
 void ThreadLocalCache::installData(VM& vm, Data* data)
 {
-#if ENABLE(FAST_TLS_JIT)
+#if USE(FAST_TLS_FOR_TLC)
     UNUSED_PARAM(vm);
     _pthread_setspecific_direct(tlsKey, data);
 #else

Modified: branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCache.h (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCache.h	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCache.h	2018-01-31 19:21:55 UTC (rev 227914)
@@ -92,7 +92,7 @@
     Heap& m_heap;
     Data* m_data { nullptr };
 
-#if ENABLE(FAST_TLS_JIT)
+#if USE(FAST_TLS_FOR_TLC)
     static const pthread_key_t tlsKey = WTF_GC_TLC_KEY;
 #endif
 };

Modified: branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCacheInlines.h (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCacheInlines.h	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/heap/ThreadLocalCacheInlines.h	2018-01-31 19:21:55 UTC (rev 227914)
@@ -31,7 +31,7 @@
 
 inline ThreadLocalCache::Data* ThreadLocalCache::getImpl(VM& vm)
 {
-#if ENABLE(FAST_TLS_JIT)
+#if USE(FAST_TLS_FOR_TLC)
     UNUSED_PARAM(vm);
     return static_cast<Data*>(_pthread_getspecific_direct(tlsKey));
 #else

Modified: branches/safari-605-branch/Source/_javascript_Core/jit/AssemblyHelpers.cpp (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/jit/AssemblyHelpers.cpp	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/jit/AssemblyHelpers.cpp	2018-01-31 19:21:55 UTC (rev 227914)
@@ -595,7 +595,7 @@
     Jump popPath;
     Jump done;
     
-#if ENABLE(FAST_TLS_JIT)
+#if USE(FAST_TLS_FOR_TLC)
     loadFromTLSPtr(fastTLSOffsetForKey(WTF_GC_TLC_KEY), scratchGPR);
 #else
     loadPtr(&vm().threadLocalCacheData, scratchGPR);

Modified: branches/safari-605-branch/Source/_javascript_Core/runtime/VM.cpp (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/runtime/VM.cpp	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/runtime/VM.cpp	2018-01-31 19:21:55 UTC (rev 227914)
@@ -499,7 +499,7 @@
     m_apiLock->willDestroyVM(this);
     heap.lastChanceToFinalize();
     
-#if !ENABLE(FAST_TLS_JIT)
+#if !USE(FAST_TLS_FOR_TLC)
     ThreadLocalCache::destructor(threadLocalCacheData);
 #endif
 

Modified: branches/safari-605-branch/Source/_javascript_Core/runtime/VM.h (227913 => 227914)


--- branches/safari-605-branch/Source/_javascript_Core/runtime/VM.h	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/_javascript_Core/runtime/VM.h	2018-01-31 19:21:55 UTC (rev 227914)
@@ -658,7 +658,7 @@
     JSObject* stringRecursionCheckFirstObject { nullptr };
     HashSet<JSObject*> stringRecursionCheckVisitedObjects;
     
-#if !ENABLE(FAST_TLS_JIT)
+#if !USE(FAST_TLS_FOR_TLC)
     ThreadLocalCache::Data* threadLocalCacheData { nullptr };
 #endif
     RefPtr<ThreadLocalCache> defaultThreadLocalCache;

Modified: branches/safari-605-branch/Source/WTF/ChangeLog (227913 => 227914)


--- branches/safari-605-branch/Source/WTF/ChangeLog	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/WTF/ChangeLog	2018-01-31 19:21:55 UTC (rev 227914)
@@ -1,3 +1,20 @@
+2018-01-31  Jason Marcell  <[email protected]>
+
+        Cherry-pick r227683. rdar://problem/37019334
+
+    2018-01-26  Filip Pizlo  <[email protected]>
+
+            Disable TLS-based TLCs
+            https://bugs.webkit.org/show_bug.cgi?id=182175
+
+            Reviewed by Saam Barati.
+
+            Add a flag for TLS-based TLCs and set it to 0. We can re-enable this feature when we need to use TLCs for
+            actual thread-local allocation and when we fix the fact that WebCore context switches JSC VMs without telling
+            us.
+
+            * wtf/Platform.h:
+
 2018-01-30  Jason Marcell  <[email protected]>
 
         Cherry-pick r227617. rdar://problem/37019352

Modified: branches/safari-605-branch/Source/WTF/wtf/Platform.h (227913 => 227914)


--- branches/safari-605-branch/Source/WTF/wtf/Platform.h	2018-01-31 19:21:51 UTC (rev 227913)
+++ branches/safari-605-branch/Source/WTF/wtf/Platform.h	2018-01-31 19:21:55 UTC (rev 227914)
@@ -825,6 +825,11 @@
 #define ENABLE_FAST_TLS_JIT 1
 #endif
 
+// This feature is currently disabled because WebCore will context switch VMs without telling JSC.
+// FIXME: Re-enable this feature.
+// https://bugs.webkit.org/show_bug.cgi?id=182173
+#define USE_FAST_TLS_FOR_TLC 0
+
 #if CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2) || CPU(ARM64) || CPU(ARM_TRADITIONAL) || CPU(MIPS)
 #define ENABLE_MASM_PROBE 1
 #else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to