ResourceUsageOverlay should show GC timers.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Dec 2015 21:36:27 +0000 (21:36 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Dec 2015 21:36:27 +0000 (21:36 +0000)
commit956989c466c6e9a8f4d9a5258e3c878c11e71ab7
treea802d5fc068ec274dbcbb24ed1e3418c235eb2e6
parente77673b7f924ffb035ead8892b0fa100320a4911
ResourceUsageOverlay should show GC timers.
<https://webkit.org/b/152151>

Reviewed by Darin Adler.

Source/JavaScriptCore:

Expose the next fire time (in WTF timestamp style) of a GCActivityCallback.

* heap/GCActivityCallback.cpp:
(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::cancelTimer):
* heap/GCActivityCallback.h:

Source/WebCore:

Add countdowns until next Eden and Full GC to the overlay. It also shows if there
is no garbage collection scheduled. This will be helpful in understanding why GC
sometimes takes a very long time to happen.

* page/ResourceUsageOverlay.h:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::formatByteNumber): Drive-by silly math fix. :|
(WebCore::gcTimerString):
(WebCore::ResourceUsageOverlay::platformDraw):
(WebCore::nextFireTimeForGCTimer):
(WebCore::runSamplerThread):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/GCActivityCallback.cpp
Source/JavaScriptCore/heap/GCActivityCallback.h
Source/WebCore/ChangeLog
Source/WebCore/page/ResourceUsageOverlay.h
Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm