-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It should be easy to decide how WebKit yields
https://bugs.webkit.org/show_bug.cgi?id=174298 Reviewed by Saam Barati. Source/bmalloc: Use sched_yield() explicitly. * bmalloc/StaticMutex.cpp: (bmalloc::StaticMutex::lockSlowCase): Source/JavaScriptCore: Use the new WTF::Thread::yield() function for yielding instead of the C++ function. * heap/Heap.cpp: (JSC::Heap::resumeThePeriphery): * heap/VisitingTimeout.h: * runtime/JSCell.cpp: (JSC::JSCell::lockSlow): (JSC::JSCell::unlockSlow): * runtime/JSCell.h: * runtime/JSCellInlines.h: (JSC::JSCell::lock): (JSC::JSCell::unlock): * runtime/JSLock.cpp: (JSC::JSLock::grabAllLocks): * runtime/SamplingProfiler.cpp: Source/WebCore: No new tests because the WebCore change is just a change to how we #include things. * inspector/InspectorPageAgent.h: * inspector/TimelineRecordFactory.h: * workers/Worker.h: * workers/WorkerGlobalScopeProxy.h: * workers/WorkerMessagingProxy.h: Source/WebKitLegacy: * Storage/StorageTracker.h: Source/WTF: Created a Thread::yield() abstraction for sched_yield(), and made WTF use it everywhere that it had previously used std::this_thread::yield(). To make it less annoying to experiment with changes to the lock algorithm in the future, this also moves the meat of the algorithm into LockAlgorithmInlines.h. Only two files include that header. Since LockAlgorithm.h no longer includes ParkingLot.h, a bunch of files in WK now need to include timing headers (Seconds, MonotonicTime, etc) manually. * WTF.xcodeproj/project.pbxproj: * benchmarks/ToyLocks.h: * wtf/CMakeLists.txt: * wtf/Lock.cpp: * wtf/LockAlgorithm.h: (WTF::LockAlgorithm::lockSlow): Deleted. (WTF::LockAlgorithm::unlockSlow): Deleted. * wtf/LockAlgorithmInlines.h: Added. (WTF::hasParkedBit>::lockSlow): (WTF::hasParkedBit>::unlockSlow): * wtf/MainThread.cpp: * wtf/RunLoopTimer.h: * wtf/Threading.cpp: * wtf/Threading.h: * wtf/ThreadingPthreads.cpp: (WTF::Thread::yield): * wtf/ThreadingWin.cpp: (WTF::Thread::yield): * wtf/WordLock.cpp: (WTF::WordLockBase::lockSlow): (WTF::WordLockBase::unlockSlow): Canonical link: https://commits.webkit.org/191572@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Filip Pizlo
committed
Jul 22, 2017
1 parent
2e280e9
commit db0f4c3
Showing
32 changed files
with
310 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.