[GTK] Add initial implementation of resource usage overlay
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Feb 2017 13:03:33 +0000 (13:03 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Feb 2017 13:03:33 +0000 (13:03 +0000)
commit76c14d46ddf20752a4688797f78578faa54fa5b3
tree11a191e3e7f60fde395678b7f5b42d6626ad50ed
parent2fde74a7719c8a0c7e40a4be26ce36022e9bd4b2
[GTK] Add initial implementation of resource usage overlay
https://bugs.webkit.org/show_bug.cgi?id=167731

Reviewed by Michael Catanzaro.

.:

Enable RESOURCE_USAGE.

* Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

Also expose nextFireTime() for GTK+ port.

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

Source/WebCore:

Add an implementation of ResourceUsageOverlay and ResourceUsageThread for Linux systems.

* PlatformGTK.cmake: Add new new files to compilation.
* page/Page.cpp:
(WebCore::Page::setResourceUsageOverlayVisible): Do not create the page overlay if accelerated compositing is
not enabled.
* page/ResourceUsageOverlay.h:
* page/linux/ResourceUsageOverlayLinux.cpp: Added.
(WebCore::cpuUsageString):
(WebCore::formatByteNumber):
(WebCore::gcTimerString):
(WebCore::ResourceUsageOverlay::platformInitialize):
(WebCore::ResourceUsageOverlay::platformDestroy):
* page/linux/ResourceUsageThreadLinux.cpp: Added.
(WebCore::cpuPeriod):
(WebCore::cpuUsage):
(WebCore::ResourceUsageThread::platformThreadBody):

Source/WebKit2:

Toggle the resource usage overlay visibility by pressing CTRL + Shift + G. Only available when building with
developer mode enabled.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent):

Source/WTF:

Enable RESOURCE_USAGE for GTK+ port too.

* wtf/Platform.h:

LayoutTests:

Unskip inpector tests depending on RESOURCE_USAGE.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/GCActivityCallback.cpp
Source/JavaScriptCore/heap/GCActivityCallback.h
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/page/Page.cpp
Source/WebCore/page/ResourceUsageOverlay.h
Source/WebCore/page/ResourceUsageThread.h
Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp [new file with mode: 0644]
Source/WebCore/page/linux/ResourceUsageThreadLinux.cpp [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
Source/cmake/OptionsGTK.cmake