JavaScriptCore performance is very bad on Windows
https://bugs.webkit.org/show_bug.cgi?id=146448
Reviewed by Mark Lam.
Source/JavaScriptCore:
Profiling shows that std::this_thread::get_id() is slow on Windows.
Use WTF::currentThread() instead, which calls GetCurrentThreadId().
This is faster on Windows. The issue has been reported to Microsoft,
https://connect.microsoft.com/VisualStudio/feedback/details/1558211.
* runtime/JSLock.cpp:
(JSC::JSLockHolder::~JSLockHolder):
(JSC::JSLock::JSLock):
(JSC::JSLock::willDestroyVM):
(JSC::JSLock::setExclusiveThread):
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::currentThreadIsHoldingLock):
* runtime/JSLock.h:
(JSC::JSLock::vm):
(JSC::JSLock::hasExclusiveThread):
(JSC::JSLock::exclusiveThread):
* runtime/VM.h:
(JSC::VM::hasExclusiveThread):
(JSC::VM::exclusiveThread):
(JSC::VM::setExclusiveThread):
Source/WebCore:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM): Compile fix.
Source/WTF:
Updating the stack bounds is time consuming.
Only update the stack bounds when a new fiber is running.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::stack):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187020
268f45cc-cd09-0410-ab3c-
d52691b4dbfc