-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JSC] Skip notifyOne when all JIT threads are running
https://bugs.webkit.org/show_bug.cgi?id=269111 rdar://122677279 Reviewed by Mark Lam. Let's avoid calling notifyOne when all JIT threads are currently running. In that case, they will pick the enqueued plan without notifying anyway. This can skip some of costly syscalls like pthread_condvar related ones. We also change JITWorklist::suspendAllThreads to first use tryLock for all threads. So then, we can eagerly suspend currently-not-running-threads. And after that, we eventually ensure all threads are not running. This avoids starting JIT compilation in the latter thread while it was not having that when JITWorklist::suspendAllThreads started. * Source/JavaScriptCore/jit/JITWorklist.cpp: (JSC::JITWorklist::JITWorklist): (JSC::JITWorklist::enqueue): (JSC::JITWorklist::removeDeadPlans): (JSC::JITWorklist::visitWeakReferences): * Source/JavaScriptCore/jit/JITWorklist.h: * Source/JavaScriptCore/jit/JITWorklistThread.cpp: (JSC::JITWorklistThread::work): * Source/JavaScriptCore/jit/JITWorklistThread.h: Canonical link: https://commits.webkit.org/274407@main
- Loading branch information
1 parent
d7aeb8e
commit 17e76f5
Showing
4 changed files
with
34 additions
and
11 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