Changeset 119546 in webkit
- Timestamp:
- Jun 5, 2012, 6:37:09 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r119540 r119546 1 2012-06-05 Stephanie Lewis <slewis@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=88370 4 Memory sampler should trigger low memory signal 5 6 Reviewed by Geoff Garen. 7 8 No new tests. Verify by running stress test which crashes 9 in a few minutes without the fix. 10 11 Fix assumption in block code. We could get in a state where timer_event_source 12 had already been released before the block ran. 13 14 * platform/mac/MemoryPressureHandlerMac.mm: 15 (WebCore::MemoryPressureHandler::holdOff): 16 1 17 2012-06-05 Yoshifumi Inoue <yosin@chromium.org> 2 18 -
trunk/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm
r113445 r119546 107 107 dispatch_source_set_timer(_timer_event_source, dispatch_time(DISPATCH_TIME_NOW, seconds * NSEC_PER_SEC), DISPATCH_TIME_FOREVER, 1 * s_minimumHoldOffTime); 108 108 dispatch_source_set_event_handler(_timer_event_source, ^{ 109 dispatch_source_cancel(_timer_event_source); 110 dispatch_release(_timer_event_source); 111 _timer_event_source = 0; 109 if (_timer_event_source) { 110 dispatch_source_cancel(_timer_event_source); 111 dispatch_release(_timer_event_source); 112 _timer_event_source = 0; 113 } 112 114 memoryPressureHandler().install(); 113 115 }); -
trunk/Source/WebKit2/ChangeLog
r119535 r119546 1 2012-06-04 Stephanie Lewis <slewis@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=88370 4 Memory sampler should trigger low memory signal 5 6 Reviewed by Geoff Garen. 7 8 Send low memory signal when running the memory sampler. We'd 9 like to test memory that cannot be freed. 10 11 * Shared/WebMemorySampler.cpp: 12 (WebKit::WebMemorySampler::sampleTimerFired): 13 * Shared/WebMemorySampler.h: 14 (WebMemorySampler): 15 * Shared/mac/WebMemorySampler.mac.mm: 16 (WebKit): 17 (WebKit::WebMemorySampler::sendMemoryPressureEvent): 18 1 19 2012-06-05 Brady Eidson <beidson@apple.com> 2 20 -
trunk/Source/WebKit2/Shared/WebMemorySampler.cpp
r95901 r119546 154 154 void WebMemorySampler::sampleTimerFired(Timer<WebMemorySampler>*) 155 155 { 156 appendCurrentMemoryUsageToFile(m_sampleLogFile); 156 sendMemoryPressureEvent(); 157 appendCurrentMemoryUsageToFile(m_sampleLogFile); 157 158 } 158 159 -
trunk/Source/WebKit2/Shared/WebMemorySampler.h
r95901 r119546 90 90 void stopTimerFired(WebCore::Timer<WebMemorySampler>*); 91 91 void appendCurrentMemoryUsageToFile(WebCore::PlatformFileHandle&); 92 void sendMemoryPressureEvent(); 92 93 93 94 SystemMallocStats sampleSystemMalloc() const; -
trunk/Source/WebKit2/Shared/mac/WebMemorySampler.mac.mm
r95901 r119546 34 34 #import <mach/mach_types.h> 35 35 #import <malloc/malloc.h> 36 #import <notify.h> 36 37 #import <runtime/JSLock.h> 37 38 #import <WebCore/JSDOMWindow.h> … … 176 177 return webKitMemoryStats; 177 178 } 178 179 180 void WebMemorySampler::sendMemoryPressureEvent() 181 { 182 // Free memory that could be released if we needed more. 183 // We want to track memory that cannot. 184 notify_post("org.WebKit.lowMemory"); 185 } 186 179 187 } 180 188
Note:
See TracChangeset
for help on using the changeset viewer.