[WebCore][JSC] ResourceUsageData.{timeOfNextEdenCollection,timeOfNextFullCollection...
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Apr 2017 18:25:42 +0000 (18:25 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Apr 2017 18:25:42 +0000 (18:25 +0000)
commit54c8b1906d16b833b4b26f76b1c918307cb80155
treea6a94ddc88bfb67d212fdc1a1570b014cef2897e
parent9abca1e386a8b8da2c8455a25d0d0890f78abc58
[WebCore][JSC] ResourceUsageData.{timeOfNextEdenCollection,timeOfNextFullCollection} should be MonotonicTime
https://bugs.webkit.org/show_bug.cgi?id=170725

Reviewed by Sam Weinig.

Source/JavaScriptCore:

This patch makes GCActivityCallback return MonotonicTime instead of raw double value.

* heap/GCActivityCallback.cpp:
(JSC::GCActivityCallback::nextFireTime):
* heap/GCActivityCallback.h:

Source/WebCore:

Use MonotonicTime instead of raw doubles.
Currently, large part of data structures and helper functions are the same in
ResourceUsageOverlayCocoa.mm and ResourceUsageOverlayLinux.cpp. This should be
unified in a separate patch.

* page/ResourceUsageData.h:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::gcTimerString):
(WebCore::ResourceUsageOverlay::platformDraw):
* page/linux/ResourceUsageOverlayLinux.cpp:
(WebCore::gcTimerString):

Source/WTF:

Make MonotonicTime more constexpr friendly mainly to annotate MonotonicTime::nan() as constexpr.

* wtf/MonotonicTime.h:
(WTF::MonotonicTime::MonotonicTime):
(WTF::MonotonicTime::fromRawSeconds):
(WTF::MonotonicTime::infinity):
(WTF::MonotonicTime::nan):
(WTF::MonotonicTime::secondsSinceEpoch):
(WTF::MonotonicTime::operator bool):
(WTF::MonotonicTime::operator+):
(WTF::MonotonicTime::operator-):
(WTF::MonotonicTime::operator==):
(WTF::MonotonicTime::operator!=):
(WTF::MonotonicTime::operator<):
(WTF::MonotonicTime::operator>):
(WTF::MonotonicTime::operator<=):
(WTF::MonotonicTime::operator>=):

Tools:

* TestWebKitAPI/Tests/WTF/Time.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/GCActivityCallback.cpp
Source/JavaScriptCore/heap/GCActivityCallback.h
Source/WTF/ChangeLog
Source/WTF/wtf/MonotonicTime.h
Source/WebCore/ChangeLog
Source/WebCore/page/ResourceUsageData.h
Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm
Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/Time.cpp