Changeset 244348 in webkit
- Timestamp:
- Apr 16, 2019, 11:32:19 AM (7 years ago)
- Location:
- tags/Safari-607.2.4.1/Source
- Files:
-
- 1 added
- 8 edited
-
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (modified) (4 diffs)
-
JavaScriptCore/Sources.txt (modified) (1 diff)
-
JavaScriptCore/assembler/CPU.cpp (added)
-
JavaScriptCore/assembler/CPU.h (modified) (2 diffs)
-
JavaScriptCore/heap/MachineStackMarker.h (modified) (1 diff)
-
JavaScriptCore/runtime/JSLock.cpp (modified) (1 diff)
-
JavaScriptCore/runtime/Options.cpp (modified) (3 diffs)
-
JavaScriptCore/wasm/WasmWorklist.cpp (modified) (2 diffs)
-
WebKit/WebProcess/com.apple.WebProcess.sb.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-607.2.4.1/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r240426 r244348 1078 1078 5DBB1525131D0BD70056AD36 /* minidom.js in Copy Support Script */ = {isa = PBXBuildFile; fileRef = 1412110D0A48788700480255 /* minidom.js */; }; 1079 1079 5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */ = {isa = PBXBuildFile; fileRef = F692A8540255597D01FF60F7 /* create_hash_table */; settings = {ATTRIBUTES = (); }; }; 1080 5E158AC350BC4EC7877DC0F4 /* ObjectPrototypeInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D0CC9E1CBC149AB8F403434 /* ObjectPrototypeInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };1081 1080 623A37EC1B87A7C000754209 /* RegisterMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 623A37EB1B87A7BD00754209 /* RegisterMap.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1082 1081 627673241B680C1E00FD9F2E /* CallMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 627673221B680C1E00FD9F2E /* CallMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 3332 3331 526AC4B51E977C5D003500E1 /* WasmCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmCodeBlock.h; sourceTree = "<group>"; }; 3333 3332 527773DD1AAF83AC00BDE7E8 /* RuntimeType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeType.cpp; sourceTree = "<group>"; }; 3333 528D8EBC226156FD00E75699 /* CPU.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CPU.cpp; sourceTree = "<group>"; }; 3334 3334 52B310FA1974AE610080857C /* FunctionHasExecutedCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FunctionHasExecutedCache.h; sourceTree = "<group>"; }; 3335 3335 52B310FC1974AE870080857C /* FunctionHasExecutedCache.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionHasExecutedCache.cpp; sourceTree = "<group>"; }; … … 3651 3651 6AD2CB4C19B9140100065719 /* DebuggerEvalEnabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebuggerEvalEnabler.h; sourceTree = "<group>"; }; 3652 3652 6BA93C9590484C5BAD9316EA /* JSScriptFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptFetcher.h; sourceTree = "<group>"; }; 3653 6D0CC9E1CBC149AB8F403434 /* ObjectPrototypeInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectPrototypeInlines.h; sourceTree = "<group>"; };3654 3653 70113D491A8DB093003848C4 /* IteratorOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IteratorOperations.cpp; sourceTree = "<group>"; }; 3655 3654 70113D4A1A8DB093003848C4 /* IteratorOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IteratorOperations.h; sourceTree = "<group>"; }; … … 7611 7610 86E116B00FE75AC800B512BC /* CodeLocation.h */, 7612 7611 0F30D7BF1D95D62F0053089D /* CPU.h */, 7612 528D8EBC226156FD00E75699 /* CPU.cpp */, 7613 7613 0F37308E1C0CD68500052BFA /* DisallowMacroScratchRegisterUsage.h */, 7614 7614 0FF4275615914A20004CB9FF /* LinkBuffer.cpp */, -
tags/Safari-607.2.4.1/Source/JavaScriptCore/Sources.txt
r240375 r244348 43 43 44 44 assembler/AbstractMacroAssembler.cpp 45 assembler/CPU.cpp 45 46 assembler/LinkBuffer.cpp 46 47 assembler/MacroAssembler.cpp -
tags/Safari-607.2.4.1/Source/JavaScriptCore/assembler/CPU.h
r237173 r244348 27 27 28 28 #include "Options.h" 29 #include <wtf/NumberOfCores.h> 29 30 30 31 namespace JSC { … … 132 133 } 133 134 135 #if (CPU(X86) || CPU(X86_64)) && OS(DARWIN) 136 bool isKernTCSMAvailable(); 137 bool enableKernTCSM(); 138 int kernTCSMAwareNumberOfProcessorCores(); 139 #else 140 ALWAYS_INLINE bool isKernTCSMAvailable() { return false; } 141 ALWAYS_INLINE bool enableKernTCSM() { return false; } 142 ALWAYS_INLINE int kernTCSMAwareNumberOfProcessorCores() { return WTF::numberOfProcessorCores(); } 143 #endif 144 134 145 } // namespace JSC 135 146 -
tags/Safari-607.2.4.1/Source/JavaScriptCore/heap/MachineStackMarker.h
r231158 r244348 49 49 50 50 // Only needs to be called by clients that can use the same heap from multiple threads. 51 void addCurrentThread() { m_threadGroup->addCurrentThread(); }51 bool addCurrentThread() { return m_threadGroup->addCurrentThread() == ThreadGroupAddResult::NewlyAdded; } 52 52 53 53 WordLock& getLock() { return m_threadGroup->getLock(); } -
tags/Safari-607.2.4.1/Source/JavaScriptCore/runtime/JSLock.cpp
r237042 r244348 148 148 m_vm->setStackPointerAtVMEntry(p); 149 149 150 m_vm->heap.machineThreads().addCurrentThread(); 150 if (m_vm->heap.machineThreads().addCurrentThread()) { 151 if (isKernTCSMAvailable()) 152 enableKernTCSM(); 153 } 154 151 155 #if ENABLE(WEBASSEMBLY) 152 156 Wasm::startTrackingCurrentThread(); -
tags/Safari-607.2.4.1/Source/JavaScriptCore/runtime/Options.cpp
r240400 r244348 28 28 29 29 #include "AssemblerCommon.h" 30 #include "CPU.h" 30 31 #include "LLIntCommon.h" 31 32 #include "MinimumReservedZoneSize.h" … … 205 206 static unsigned computeNumberOfWorkerThreads(int maxNumberOfWorkerThreads, int minimum = 1) 206 207 { 207 int cpusToUse = std::min( WTF::numberOfProcessorCores(), maxNumberOfWorkerThreads);208 int cpusToUse = std::min(kernTCSMAwareNumberOfProcessorCores(), maxNumberOfWorkerThreads); 208 209 209 210 // Be paranoid, it is the OS we're dealing with, after all. … … 214 215 static int32_t computePriorityDeltaOfWorkerThreads(int32_t twoCorePriorityDelta, int32_t multiCorePriorityDelta) 215 216 { 216 if ( WTF::numberOfProcessorCores() <= 2)217 if (kernTCSMAwareNumberOfProcessorCores() <= 2) 217 218 return twoCorePriorityDelta; 218 219 -
tags/Safari-607.2.4.1/Source/JavaScriptCore/wasm/WasmWorklist.cpp
r233123 r244348 29 29 #if ENABLE(WEBASSEMBLY) 30 30 31 #include "CPU.h" 31 32 #include "WasmPlan.h" 32 33 #include <wtf/NumberOfCores.h>34 33 35 34 namespace JSC { namespace Wasm { … … 208 207 , m_planEnqueued(AutomaticThreadCondition::create()) 209 208 { 210 unsigned numberOfCompilationThreads = Options::useConcurrentJIT() ? WTF::numberOfProcessorCores() : 1;209 unsigned numberOfCompilationThreads = Options::useConcurrentJIT() ? kernTCSMAwareNumberOfProcessorCores() : 1; 211 210 m_threads.reserveCapacity(numberOfCompilationThreads); 212 211 LockHolder locker(*m_lock); -
tags/Safari-607.2.4.1/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
r241184 r244348 172 172 "machdep.cpu.brand_string" 173 173 "security.mac.sandbox.sentinel" 174 "kern.tcsm_enable" 175 "kern.tcsm_available" 174 176 "vm.footprint_suspend") 175 177 (sysctl-name-regex #"^hw.(active|avail)cpu") … … 181 183 (sysctl-name-regex #"^net.routetable") 182 184 ) 185 186 (allow sysctl-write 187 (sysctl-name 188 "kern.tcsm_enable")) 183 189 184 190 (deny iokit-get-properties)
Note:
See TracChangeset
for help on using the changeset viewer.