Title: [275125] trunk/Source/WTF
Revision
275125
Author
[email protected]
Date
2021-03-26 18:00:34 -0700 (Fri, 26 Mar 2021)

Log Message

REGRESSION (r275038?): Perf test IndexedDB/stress/large-binary-keys.html failing with logging about memory pressure events
https://bugs.webkit.org/show_bug.cgi?id=223826
<rdar://problem/75906134>

Reviewed by Darin Adler.

Use RELEASE_LOG() instead of WTFLogAlways() to log memory pressure events, so that they don't
show on stdout in the performance tests and make them fail.

* wtf/cocoa/MemoryPressureHandlerCocoa.mm:
(WTF::MemoryPressureHandler::install):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (275124 => 275125)


--- trunk/Source/WTF/ChangeLog	2021-03-27 00:56:33 UTC (rev 275124)
+++ trunk/Source/WTF/ChangeLog	2021-03-27 01:00:34 UTC (rev 275125)
@@ -1,3 +1,17 @@
+2021-03-26  Chris Dumez  <[email protected]>
+
+        REGRESSION (r275038?): Perf test IndexedDB/stress/large-binary-keys.html failing with logging about memory pressure events
+        https://bugs.webkit.org/show_bug.cgi?id=223826
+        <rdar://problem/75906134>
+
+        Reviewed by Darin Adler.
+
+        Use RELEASE_LOG() instead of WTFLogAlways() to log memory pressure events, so that they don't
+        show on stdout in the performance tests and make them fail.
+
+        * wtf/cocoa/MemoryPressureHandlerCocoa.mm:
+        (WTF::MemoryPressureHandler::install):
+
 2021-03-26  Wenson Hsieh  <[email protected]>
 
         Use PUICQuickboardController for text input when HAVE(QUICKBOARD_CONTROLLER) is defined

Modified: trunk/Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm (275124 => 275125)


--- trunk/Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm	2021-03-27 00:56:33 UTC (rev 275124)
+++ trunk/Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm	2021-03-27 01:00:34 UTC (rev 275125)
@@ -37,8 +37,16 @@
 
 extern "C" void cache_simulate_memory_warning_event(uint64_t);
 
+#define LOG_CHANNEL_PREFIX Log
+
 namespace WTF {
 
+#if RELEASE_LOG_DISABLED
+WTFLogChannel LogPerformanceLogging = { WTFLogChannelState::On, "PerformanceLogging", WTFLogLevel::Error };
+#else
+WTFLogChannel LogPerformanceLogging = { WTFLogChannelState::On, "PerformanceLogging", WTFLogLevel::Error, LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT };
+#endif
+
 void MemoryPressureHandler::platformReleaseMemory(Critical critical)
 {
     if (critical == Critical::Yes && (!isUnderMemoryPressure() || m_isSimulatingMemoryPressure)) {
@@ -96,7 +104,7 @@
                 break;
             }
             if (m_shouldLogMemoryMemoryPressureEvents)
-                WTFLogAlways("Received memory pressure event %lu vm pressure %d", status, isUnderMemoryPressure());
+                RELEASE_LOG(PerformanceLogging, "Received memory pressure event %lu vm pressure %d", status, isUnderMemoryPressure());
         });
         dispatch_resume(memoryPressureEventSource);
     });
@@ -202,3 +210,5 @@
 }
 
 } // namespace WTF
+
+#undef LOG_CHANNEL_PREFIX
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to