Skip to content

Commit

Permalink
Merge r221372 - [WPE] Enable MEMORY_SAMPLER
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=176099

Reviewed by Michael Catanzaro.

.:

Enable the otion at build time by default on Linux (currently
there are only Linux and Mac implementations of this feature).

* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsGTK.cmake:

Source/WebKit:

Enable it at runtime if the environment variable WEBKIT_SAMPLE_MEMORY is set.

* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_compositingManagerProxy):
  • Loading branch information
clopez authored and carlosgcampos committed Oct 17, 2017
1 parent c54d555 commit 00c091f
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
13 changes: 13 additions & 0 deletions ChangeLog
@@ -1,3 +1,16 @@
2017-08-30 Carlos Alberto Lopez Perez <clopez@igalia.com>

[WPE] Enable MEMORY_SAMPLER
https://bugs.webkit.org/show_bug.cgi?id=176099

Reviewed by Michael Catanzaro.

Enable the otion at build time by default on Linux (currently
there are only Linux and Mac implementations of this feature).

* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsGTK.cmake:

2017-08-11 Konstantin Tokarev <annulen@yandex.ru>

[CMake] Fix broken use of REQUIRED with find modules
Expand Down
12 changes: 12 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,15 @@
2017-08-30 Carlos Alberto Lopez Perez <clopez@igalia.com>

[WPE] Enable MEMORY_SAMPLER
https://bugs.webkit.org/show_bug.cgi?id=176099

Reviewed by Michael Catanzaro.

Enable it at runtime if the environment variable WEBKIT_SAMPLE_MEMORY is set.

* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_compositingManagerProxy):

2017-08-11 Adrian Perez de Castro <aperez@igalia.com>

[WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
Expand Down
5 changes: 5 additions & 0 deletions Source/WebKit/UIProcess/API/wpe/WPEView.cpp
Expand Up @@ -66,6 +66,11 @@ View::View(struct wpe_view_backend* backend, const API::PageConfiguration& baseC
auto* pool = configuration->processPool();
m_pageProxy = pool->createWebPage(*m_pageClient, WTFMove(configuration));

#if ENABLE(MEMORY_SAMPLER)
if (getenv("WEBKIT_SAMPLE_MEMORY"))
pool->startMemorySampler(0);
#endif

m_backend = backend;
if (!m_backend)
m_backend = wpe_view_backend_create();
Expand Down
4 changes: 2 additions & 2 deletions Source/cmake/OptionsGTK.cmake
Expand Up @@ -124,10 +124,10 @@ else ()
endif ()

if (CMAKE_SYSTEM_NAME MATCHES "Linux")
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_USAGE PRIVATE ON)
else ()
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PUBLIC OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_USAGE PRIVATE OFF)
endif ()

Expand Down
2 changes: 2 additions & 0 deletions Source/cmake/OptionsWPE.cmake
Expand Up @@ -36,8 +36,10 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_XSLT PUBLIC ON)

if (CMAKE_SYSTEM_NAME MATCHES "Linux")
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_USAGE PRIVATE ON)
else ()
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_USAGE PRIVATE OFF)
endif ()

Expand Down

0 comments on commit 00c091f

Please sign in to comment.