REGRESSION(r196780): Fake memory handler takes too long to run now.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Feb 2016 17:02:16 +0000 (17:02 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Feb 2016 17:02:16 +0000 (17:02 +0000)
Unreviewed bot fix.

Put the footprint comparison code behind a compile-time flag for now.
It's taking too long to run on bots, and memory is getting measured
before all the pressure relief code has a chance to run.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196862 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm

index 0fe1706..19504c9 100644 (file)
@@ -1,3 +1,16 @@
+2016-02-20  Andreas Kling  <akling@apple.com>
+
+        REGRESSION(r196780): Fake memory handler takes too long to run now.
+
+        Unreviewed bot fix.
+
+        Put the footprint comparison code behind a compile-time flag for now.
+        It's taking too long to run on bots, and memory is getting measured
+        before all the pressure relief code has a chance to run.
+
+        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
+        (WebCore::MemoryPressureHandler::install):
+
 2016-02-20  Olivier Blin  <olivier.blin@softathome.com>
 
         Do not require UDate in LocaleICU with !ENABLE_DATE_AND_TIME_INPUT_TYPES
index 40a367b..6c252b5 100644 (file)
@@ -46,6 +46,8 @@
 #import "WebCoreThread.h"
 #endif
 
+#define ENABLE_FMW_FOOTPRINT_COMPARISON 0
+
 extern "C" void cache_simulate_memory_warning_event(uint64_t);
 extern "C" void _sqlite3_purgeEligiblePagerCacheMemory(void);
 
@@ -130,7 +132,7 @@ void MemoryPressureHandler::install()
 
     // Allow simulation of memory pressure with "notifyutil -p org.WebKit.lowMemory"
     notify_register_dispatch("org.WebKit.lowMemory", &_notifyToken, dispatch_get_main_queue(), ^(int) {
-#if ENABLE(RESOURCE_USAGE)
+#if ENABLE(FMW_FOOTPRINT_COMPARISON)
         auto footprintBefore = pagesPerVMTag();
 #endif
 
@@ -143,7 +145,7 @@ void MemoryPressureHandler::install()
 
         malloc_zone_pressure_relief(nullptr, 0);
 
-#if ENABLE(RESOURCE_USAGE)
+#if ENABLE(FMW_FOOTPRINT_COMPARISON)
         auto footprintAfter = pagesPerVMTag();
         logFootprintComparison(footprintBefore, footprintAfter);
 #endif