Changeset 232881 in webkit


Ignore:
Timestamp:
Jun 15, 2018 10:35:30 AM (6 years ago)
Author:
clopez@igalia.com
Message:

[GTK][WKE] Disable memory pressure handling when running layout tests (WTR)
https://bugs.webkit.org/show_bug.cgi?id=186663

Reviewed by Michael Catanzaro.

Source/WebKit:

r196943 added a mechanism to disable the memory pressure handling
on Mac. This patch enables using that mechanism also for GTK/WPE.
To do that the environment variable WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR
should bet set to 1.
We want to use this on the layout tests to avoid flaky tests caused
by accumulated leaks on the WebProcess by different tests.

  • UIProcess/gtk/WebProcessPoolGtk.cpp:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • UIProcess/wpe/WebProcessPoolWPE.cpp:

(WebKit::WebProcessPool::platformInitializeWebProcess):

Tools:

Disable memory pressure handling when running tests via WTR by
setting WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR=1 on the environment.

  • WebKitTestRunner/gtk/main.cpp:

(main):

  • WebKitTestRunner/wpe/main.cpp:

(main):

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r232879 r232881  
     12018-06-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [GTK][WKE] Disable memory pressure handling when running layout tests (WTR)
     4        https://bugs.webkit.org/show_bug.cgi?id=186663
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        r196943 added a mechanism to disable the memory pressure handling
     9        on Mac. This patch enables using that mechanism also for GTK/WPE.
     10        To do that the environment variable WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR
     11        should bet set to 1.
     12        We want to use this on the layout tests to avoid flaky tests caused
     13        by accumulated leaks on the WebProcess by different tests.
     14
     15        * UIProcess/gtk/WebProcessPoolGtk.cpp:
     16        (WebKit::WebProcessPool::platformInitializeWebProcess):
     17        * UIProcess/wpe/WebProcessPoolWPE.cpp:
     18        (WebKit::WebProcessPool::platformInitializeWebProcess):
     19
    1202018-06-15  Per Arne Vollan  <pvollan@apple.com>
    221
  • trunk/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp

    r230625 r232881  
    9898        parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath;
    9999
     100    const char* disableMemoryPressureMonitor = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR");
     101    if (disableMemoryPressureMonitor && !strcmp(disableMemoryPressureMonitor, "1"))
     102        parameters.shouldSuppressMemoryPressureHandler = true;
     103
    100104#if USE(GSTREAMER)
    101105    parameters.gstreamerOptions = WebCore::extractGStreamerOptionsFromCommandLine();
  • trunk/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp

    r230625 r232881  
    9494{
    9595    parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModelDocumentViewer;
     96
     97    const char* disableMemoryPressureMonitor = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR");
     98    if (disableMemoryPressureMonitor && !strcmp(disableMemoryPressureMonitor, "1"))
     99        parameters.shouldSuppressMemoryPressureHandler = true;
     100
    96101#if USE(GSTREAMER)
    97102    parameters.gstreamerOptions = WebCore::extractGStreamerOptionsFromCommandLine();
  • trunk/Tools/ChangeLog

    r232877 r232881  
     12018-06-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [GTK][WKE] Disable memory pressure handling when running layout tests (WTR)
     4        https://bugs.webkit.org/show_bug.cgi?id=186663
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Disable memory pressure handling when running tests via WTR by
     9        setting WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR=1 on the environment.
     10
     11        * WebKitTestRunner/gtk/main.cpp:
     12        (main):
     13        * WebKitTestRunner/wpe/main.cpp:
     14        (main):
     15
    1162018-06-15  Jonathan Bedard  <jbedard@apple.com>
    217
  • trunk/Tools/WebKitTestRunner/gtk/main.cpp

    r230559 r232881  
    3434{
    3535    g_setenv("WEBKIT_FORCE_COMPLEX_TEXT", "0", FALSE);
     36    g_setenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR", "1", FALSE);
    3637
    3738    gtk_init(&argc, &argv);
  • trunk/Tools/WebKitTestRunner/wpe/main.cpp

    r216497 r232881  
    2727
    2828#include "TestController.h"
     29#include <glib.h>
    2930
    3031int main(int argc, char** argv)
    3132{
     33    g_setenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR", "1", FALSE);
     34
    3235    WTR::TestController controller(argc, const_cast<const char**>(argv));
    3336    return 0;
Note: See TracChangeset for help on using the changeset viewer.