Changeset 95510 in webkit
- Timestamp:
- Sep 19, 2011 8:35:49 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/APIShims.h
r80995 r95510 41 41 { 42 42 UNUSED_PARAM(registerThread); 43 #if ENABLE(JSC_MULTIPLE_THREADS)44 43 if (registerThread) 45 44 globalData->heap.machineThreads().addCurrentThread(); 46 #endif47 45 m_globalData->heap.activityCallback()->synchronize(); 48 46 m_globalData->timeoutChecker.start(); -
trunk/Source/JavaScriptCore/API/JSContextRef.cpp
r94599 r95510 93 93 APIEntryShim entryShim(globalData.get(), false); 94 94 95 #if ENABLE(JSC_MULTIPLE_THREADS)96 95 globalData->makeUsableFromMultipleThreads(); 97 #endif98 96 99 97 if (!globalObjectClass) { -
trunk/Source/JavaScriptCore/ChangeLog
r95507 r95510 1 2011-09-19 Geoffrey Garen <ggaren@apple.com> 2 3 Removed ENABLE_JSC_MULTIPLE_THREADS and related #ifdefs. 4 https://bugs.webkit.org/show_bug.cgi?id=68422 5 6 As discussed on webkit-dev. All ports build with threads enabled in JSC now. 7 8 This may break WinCE and other ports that have not built and tested with 9 this configuration. I've filed bugs for port maintainers. It's time for 10 WebKit to move forward. 11 12 Reviewed by Sam Weinig. 13 14 * API/APIShims.h: 15 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): 16 * API/JSContextRef.cpp: 17 * heap/MachineStackMarker.cpp: 18 (JSC::MachineThreads::MachineThreads): 19 (JSC::MachineThreads::~MachineThreads): 20 (JSC::MachineThreads::gatherConservativeRoots): 21 * heap/MachineStackMarker.h: 22 * runtime/InitializeThreading.cpp: 23 (JSC::initializeThreadingOnce): 24 (JSC::initializeThreading): 25 * runtime/JSGlobalData.cpp: 26 (JSC::JSGlobalData::sharedInstance): 27 * runtime/JSGlobalData.h: 28 (JSC::JSGlobalData::makeUsableFromMultipleThreads): 29 * runtime/JSLock.cpp: 30 * runtime/Structure.cpp: 31 * wtf/Platform.h: 32 1 33 2011-09-19 Sheriff Bot <webkit.review.bot@gmail.com> 2 34 -
trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp
r95498 r95510 77 77 #endif 78 78 79 #if ENABLE(JSC_MULTIPLE_THREADS) &&USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN)79 #if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) 80 80 #include <signal.h> 81 81 #endif … … 98 98 #endif 99 99 } 100 101 #if ENABLE(JSC_MULTIPLE_THREADS)102 100 103 101 #if OS(DARWIN) … … 146 144 }; 147 145 148 #endif149 150 146 MachineThreads::MachineThreads(Heap* heap) 151 147 : m_heap(heap) 152 #if ENABLE(JSC_MULTIPLE_THREADS)153 148 , m_registeredThreads(0) 154 149 , m_threadSpecific(0) 155 #endif156 150 { 157 151 } … … 159 153 MachineThreads::~MachineThreads() 160 154 { 161 #if ENABLE(JSC_MULTIPLE_THREADS)162 155 if (m_threadSpecific) { 163 156 int error = pthread_key_delete(m_threadSpecific); … … 171 164 t = next; 172 165 } 173 #endif 174 } 175 176 #if ENABLE(JSC_MULTIPLE_THREADS) 166 } 177 167 178 168 static inline PlatformThread getCurrentPlatformThread() … … 244 234 } 245 235 246 #endif247 248 236 #if COMPILER(GCC) 249 237 #define REGISTER_BUFFER_ALIGNMENT __attribute__ ((aligned (sizeof(void*)))) … … 275 263 conservativeRoots.add(stackBegin, stackEnd); 276 264 } 277 278 #if ENABLE(JSC_MULTIPLE_THREADS)279 265 280 266 static inline void suspendThread(const PlatformThread& platformThread) … … 483 469 } 484 470 485 #endif486 487 471 void MachineThreads::gatherConservativeRoots(ConservativeRoots& conservativeRoots, void* stackCurrent) 488 472 { 489 473 gatherFromCurrentThread(conservativeRoots, stackCurrent); 490 491 #if ENABLE(JSC_MULTIPLE_THREADS)492 474 493 475 if (m_threadSpecific) { … … 511 493 #endif 512 494 } 513 #endif514 495 } 515 496 -
trunk/Source/JavaScriptCore/heap/MachineStackMarker.h
r83506 r95510 23 23 #define MachineThreads_h 24 24 25 #include <pthread.h> 25 26 #include <wtf/Noncopyable.h> 26 27 #include <wtf/ThreadingPrimitives.h> 27 28 #if ENABLE(JSC_MULTIPLE_THREADS)29 #include <pthread.h>30 #endif31 28 32 29 namespace JSC { … … 43 40 void gatherConservativeRoots(ConservativeRoots&, void* stackCurrent); 44 41 45 #if ENABLE(JSC_MULTIPLE_THREADS)46 42 void makeUsableFromMultipleThreads(); 47 43 void addCurrentThread(); // Only needs to be called by clients that can use the same heap from multiple threads. 48 #endif49 44 50 45 private: 51 46 void gatherFromCurrentThread(ConservativeRoots&, void* stackCurrent); 52 47 53 #if ENABLE(JSC_MULTIPLE_THREADS)54 48 class Thread; 55 49 … … 58 52 59 53 void gatherFromOtherThread(ConservativeRoots&, Thread*); 60 #endif61 54 62 55 Heap* m_heap; 63 64 #if ENABLE(JSC_MULTIPLE_THREADS)65 56 Mutex m_registeredThreadsMutex; 66 57 Thread* m_registeredThreads; 67 58 pthread_key_t m_threadSpecific; 68 #endif69 59 }; 70 60 -
trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp
r94952 r95510 45 45 namespace JSC { 46 46 47 #if OS(DARWIN) && ENABLE(JSC_MULTIPLE_THREADS)47 #if OS(DARWIN) 48 48 static pthread_once_t initializeThreadingKeyOnce = PTHREAD_ONCE_INIT; 49 49 #endif … … 60 60 ExecutableAllocator::initializeAllocator(); 61 61 #endif 62 #if ENABLE(JSC_MULTIPLE_THREADS)63 62 RegisterFile::initializeThreading(); 64 #endif65 63 } 66 64 67 65 void initializeThreading() 68 66 { 69 #if OS(DARWIN) && ENABLE(JSC_MULTIPLE_THREADS)67 #if OS(DARWIN) 70 68 pthread_once(&initializeThreadingKeyOnce, initializeThreadingOnce); 71 69 #else -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp
r95507 r95510 51 51 #include "Nodes.h" 52 52 #include "Parser.h" 53 #if ENABLE(REGEXP_TRACING) 54 #include "RegExp.h" 55 #endif 53 56 #include "RegExpCache.h" 54 57 #include "RegExpObject.h" 55 58 #include "StrictEvalActivation.h" 59 #include <wtf/Threading.h> 56 60 #include <wtf/WTFThreadData.h> 57 #if ENABLE(REGEXP_TRACING)58 #include "RegExp.h"59 #endif60 61 62 #if ENABLE(JSC_MULTIPLE_THREADS)63 #include <wtf/Threading.h>64 #endif65 66 61 #if PLATFORM(MAC) 67 62 #include <CoreFoundation/CoreFoundation.h> … … 388 383 if (!instance) { 389 384 instance = adoptRef(new JSGlobalData(APIShared, ThreadStackTypeSmall, SmallHeap)).leakRef(); 390 #if ENABLE(JSC_MULTIPLE_THREADS)391 385 instance->makeUsableFromMultipleThreads(); 392 #endif393 386 } 394 387 return *instance; -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.h
r95310 r95510 130 130 ~JSGlobalData(); 131 131 132 #if ENABLE(JSC_MULTIPLE_THREADS)133 // Will start tracking threads that use the heap, which is resource-heavy.134 132 void makeUsableFromMultipleThreads() { heap.machineThreads().makeUsableFromMultipleThreads(); } 135 #endif136 133 137 134 GlobalDataType globalDataType; -
trunk/Source/JavaScriptCore/runtime/JSLock.cpp
r81040 r95510 36 36 // automatically protected against concurrent access from multiple threads. 37 37 // So it's safe to disable it on non-mac platforms where we don't have native pthreads. 38 #if ENABLE(JSC_MULTIPLE_THREADS) &&(OS(DARWIN) || USE(PTHREADS))38 #if (OS(DARWIN) || USE(PTHREADS)) 39 39 40 40 // Acquire this mutex before accessing lock-related data. … … 214 214 } 215 215 216 #else // ENABLE(JSC_MULTIPLE_THREADS) &&(OS(DARWIN) || USE(PTHREADS))216 #else // (OS(DARWIN) || USE(PTHREADS)) 217 217 218 218 JSLock::JSLock(ExecState*) … … 261 261 } 262 262 263 #endif // ENABLE(JSC_MULTIPLE_THREADS) &&(OS(DARWIN) || USE(PTHREADS))263 #endif // (OS(DARWIN) || USE(PTHREADS)) 264 264 265 265 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r95340 r95510 35 35 #include <wtf/RefCountedLeakCounter.h> 36 36 #include <wtf/RefPtr.h> 37 38 #if ENABLE(JSC_MULTIPLE_THREADS)39 37 #include <wtf/Threading.h> 40 #endif41 38 42 39 #define DUMP_STRUCTURE_ID_STATISTICS 0 -
trunk/Source/JavaScriptCore/wtf/Platform.h
r95498 r95510 509 509 #endif 510 510 511 #if !defined(ENABLE_JSC_MULTIPLE_THREADS)512 #define ENABLE_JSC_MULTIPLE_THREADS 1513 #endif514 515 511 #if !defined(ENABLE_WTF_MULTIPLE_THREADS) 516 512 #define ENABLE_WTF_MULTIPLE_THREADS 1 … … 1045 1041 1046 1042 #if !defined(ENABLE_LAZY_BLOCK_FREEING) 1047 #if ENABLE(JSC_MULTIPLE_THREADS)1048 1043 #define ENABLE_LAZY_BLOCK_FREEING 1 1049 #endif1050 1044 #endif 1051 1045
Note: See TracChangeset
for help on using the changeset viewer.