Changeset 179942 in webkit
- Timestamp:
- Feb 11, 2015 12:09:13 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r179941 r179942 1 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com> 2 3 Activate ReliefLogger of a memory pressure handler for linux system. 4 https://bugs.webkit.org/show_bug.cgi?id=123611 5 6 Reviewed by Anders Carlsson. 7 8 Put more logs for the time when a system goes under memory pressure or viceversa. 9 10 No new tests since no engine behavior changed. 11 12 * platform/linux/MemoryPressureHandlerLinux.cpp: 13 (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent): Wait a memory pressure event 14 from cgroup in a seperated thread. Once a pressure event happens, respondToMemoryPressure() 15 would be called to get back some resources. 16 (WebCore::MemoryPressureHandler::install): Install memoryPressureHandler module 17 to make it work. 18 1 19 2015-02-11 Alex Christensen <achristensen@webkit.org> 2 20 -
trunk/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
r178667 r179942 98 98 } 99 99 100 memoryPressureHandler().m_underMemoryPressure = true; 101 callOnMainThread([] { 102 memoryPressureHandler().respondToMemoryPressure(true); 100 // FIXME: Current memcg does not provide any way for users to know how serious the memory pressure is. 101 // So we assume all notifications from memcg are critical for now. If memcg had better inferfaces 102 // to get a detailed memory pressure level in the future, we should update here accordingly. 103 bool critical = true; 104 if (ReliefLogger::loggingEnabled()) 105 LOG(MemoryPressure, "Got memory pressure notification (%s)", critical ? "critical" : "non-critical"); 106 107 memoryPressureHandler().setUnderMemoryPressure(critical); 108 callOnMainThread([critical] { 109 memoryPressureHandler().respondToMemoryPressure(critical); 103 110 }); 104 111 } … … 157 164 } 158 165 159 m_underMemoryPressure = false; 166 if (ReliefLogger::loggingEnabled() && isUnderMemoryPressure()) 167 LOG(MemoryPressure, "System is no longer under memory pressure."); 168 169 setUnderMemoryPressure(false); 160 170 m_installed = true; 161 171 } -
trunk/Source/WebKit2/ChangeLog
r179932 r179942 1 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com> 2 3 Activate ReliefLogger of a memory pressure handler for linux system. 4 https://bugs.webkit.org/show_bug.cgi?id=123611 5 6 Reviewed by Anders Carlsson. 7 8 * Shared/WebProcessCreationParameters.cpp: 9 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): 10 Make the parameter, shouldEnableMemoryPressureReliefLogging shareable with COCOA else systems. 11 (WebKit::WebProcessCreationParameters::encode): ditto. 12 (WebKit::WebProcessCreationParameters::decode): ditto. 13 * Shared/WebProcessCreationParameters.h: 14 * UIProcess/WebProcessPool.cpp: 15 (WebKit::WebProcessPool::createNewWebProcess): Set shouldEnableMemoryPressureReliefLogging 16 to true for linux system. 17 * WebProcess/WebProcess.cpp: 18 (WebKit::WebProcess::initializeWebProcess): Pass the shouldEnableMemoryPressureReliefLogging value 19 to MemoryPressureHandler::ReliefLogger::setLoggingEnabled(). 20 1 21 2015-02-11 Yusuke Suzuki <utatane.tea@gmail.com> 2 22 -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
r179870 r179942 34 34 WebProcessCreationParameters::WebProcessCreationParameters() 35 35 : shouldAlwaysUseComplexTextCodePath(false) 36 , shouldEnableMemoryPressureReliefLogging(false) 36 37 , shouldUseFontSmoothing(true) 37 38 , defaultRequestTimeoutInterval(INT_MAX) … … 42 43 , shouldEnableJIT(false) 43 44 , shouldEnableFTLJIT(false) 44 , shouldEnableMemoryPressureReliefLogging(false)45 45 #endif 46 46 #if ENABLE(NETWORK_PROCESS) … … 101 101 encoder.encodeEnum(cacheModel); 102 102 encoder << shouldAlwaysUseComplexTextCodePath; 103 encoder << shouldEnableMemoryPressureReliefLogging; 103 104 encoder << shouldUseFontSmoothing; 104 105 encoder << iconDatabaseEnabled; … … 122 123 encoder << shouldEnableJIT; 123 124 encoder << shouldEnableFTLJIT; 124 encoder << shouldEnableMemoryPressureReliefLogging;125 125 encoder << !!bundleParameterData; 126 126 if (bundleParameterData) … … 221 221 if (!decoder.decode(parameters.shouldAlwaysUseComplexTextCodePath)) 222 222 return false; 223 if (!decoder.decode(parameters.shouldEnableMemoryPressureReliefLogging)) 224 return false; 223 225 if (!decoder.decode(parameters.shouldUseFontSmoothing)) 224 226 return false; … … 261 263 if (!decoder.decode(parameters.shouldEnableFTLJIT)) 262 264 return false; 263 if (!decoder.decode(parameters.shouldEnableMemoryPressureReliefLogging)) 264 return false; 265 265 266 266 bool hasBundleParameterData; 267 267 if (!decoder.decode(hasBundleParameterData)) -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h
r179870 r179942 110 110 111 111 bool shouldAlwaysUseComplexTextCodePath; 112 bool shouldEnableMemoryPressureReliefLogging; 112 113 bool shouldUseFontSmoothing; 113 114 … … 144 145 bool shouldEnableJIT; 145 146 bool shouldEnableFTLJIT; 146 bool shouldEnableMemoryPressureReliefLogging;147 147 148 148 RefPtr<API::Data> bundleParameterData; -
trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp
r179870 r179942 685 685 #endif 686 686 687 #if OS(LINUX) 688 parameters.shouldEnableMemoryPressureReliefLogging = true; 689 #endif 690 687 691 // Add any platform specific parameters 688 692 platformInitializeWebProcess(parameters); -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r179870 r179942 277 277 #endif 278 278 279 #if OS(LINUX) 280 WebCore::MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging); 281 #endif 282 279 283 platformInitializeWebProcess(WTF::move(parameters)); 280 284
Note: See TracChangeset
for help on using the changeset viewer.