JSC should have a simple way of gathering IC statistics
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2016 02:02:47 +0000 (02:02 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2016 02:02:47 +0000 (02:02 +0000)
commit55b09182151d719802b9fd8dbc5278c2352f0b6b
tree5ac86b0cca6ef2751fc1759af1fe0ae12dfc0b46
parent2b286b35baff831c42b69f2f3a6e5862c7ee460a
JSC should have a simple way of gathering IC statistics
https://bugs.webkit.org/show_bug.cgi?id=156317

Reviewed by Benjamin Poulain.
Source/JavaScriptCore:

This adds a cheap, runtime-enabled way of gathering statistics about why we take the slow
paths for inline caches. This is complementary to our existing bytecode profiler. Eventually
we may want to combine the two things.

This is not a slow-down on anything because we only do extra work on IC slow paths and if
it's disabled it's just a load-and-branch to skip the stats gathering code.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ICStats.cpp: Added.
* jit/ICStats.h: Added.
* jit/JITOperations.cpp:
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::inherits):
(JSC::JSValue::classInfoOrNull):
(JSC::JSValue::toThis):
* runtime/Options.h:

Source/WTF:

Make it easier to do relative sleeping on a condition. Previously you could do this using
std::chrono. I now believe that std::chrono is just a bad decision, and I always want to
use doubles instead. This makes it easier to do the right thing and use doubles.

* wtf/Condition.h:
(WTF::ConditionBase::waitUntilMonotonicClockSeconds):
(WTF::ConditionBase::waitForSeconds):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/jit/ICStats.cpp [new file with mode: 0644]
Source/JavaScriptCore/jit/ICStats.h [new file with mode: 0644]
Source/JavaScriptCore/jit/JITOperations.cpp
Source/JavaScriptCore/runtime/JSCJSValue.h
Source/JavaScriptCore/runtime/JSCJSValueInlines.h
Source/JavaScriptCore/runtime/Options.h
Source/WTF/ChangeLog
Source/WTF/wtf/Condition.h