Changeset 122462 in webkit
- Timestamp:
- Jul 12, 2012 8:34:35 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r122423 r122462 1 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 3 [Qt] Implement MemoryUsageSupport 4 https://bugs.webkit.org/show_bug.cgi?id=91094 5 6 Reviewed by Adam Barth. 7 8 Compile in MemoryStatistics so we can make use of the interface. 9 10 * Target.pri: 11 1 12 2012-07-12 Csaba Osztrogonác <ossy@webkit.org> 2 13 -
trunk/Source/JavaScriptCore/Target.pri
r122385 r122462 219 219 runtime/Lookup.cpp \ 220 220 runtime/MathObject.cpp \ 221 runtime/MemoryStatistics.cpp \ 221 222 runtime/NameConstructor.cpp \ 222 223 runtime/NameInstance.cpp \ -
trunk/Source/WebCore/ChangeLog
r122460 r122462 1 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 3 [Qt] Implement MemoryUsageSupport 4 https://bugs.webkit.org/show_bug.cgi?id=91094 5 6 Reviewed by Adam Barth. 7 8 Implements Qt versions of the memory-usage functions using the information we have available 9 from the various memory systems used in WebKit. 10 11 Also gets rid of a redundant indirection in V8GCController. 12 13 * Target.pri: 14 * bindings/v8/V8GCController.cpp: 15 (WebCore::V8GCController::gcEpilogue): 16 (WebCore::V8GCController::checkMemoryUsage): 17 * platform/qt/MemoryUsageSupportQt.cpp: Added. 18 (WebCore::mallocMemoryUsage): 19 (WebCore::memoryUsageKB): 20 (WebCore::actualMemoryUsageKB): 21 (WebCore::MemoryUsageSupport::memoryUsageMB): 22 (WebCore::MemoryUsageSupport::actualMemoryUsageMB): 23 (WebCore::MemoryUsageSupport::lowMemoryUsageMB): 24 (WebCore::MemoryUsageSupport::highMemoryUsageMB): 25 (WebCore::MemoryUsageSupport::highUsageDeltaMB): 26 (WebCore::MemoryUsageSupport::processMemorySizesInBytes): 27 * platform/qt/PlatformSupport.h: 28 (PlatformSupport): 29 1 30 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org> 2 31 -
trunk/Source/WebCore/Target.pri
r122445 r122462 1168 1168 platform/Logging.cpp \ 1169 1169 platform/MemoryPressureHandler.cpp \ 1170 platform/ MemoryUsageSupport.cpp \1170 platform/qt/MemoryUsageSupportQt.cpp \ 1171 1171 platform/MIMETypeRegistry.cpp \ 1172 1172 platform/mock/DeviceMotionClientMock.cpp \ -
trunk/Source/WebCore/bindings/v8/V8GCController.cpp
r121047 r122462 476 476 namespace { 477 477 478 int getMemoryUsageInMB()479 {480 #if PLATFORM(CHROMIUM)481 return MemoryUsageSupport::memoryUsageMB();482 #else483 return 0;484 #endif485 }486 487 int getActualMemoryUsageInMB()488 {489 #if PLATFORM(CHROMIUM)490 return MemoryUsageSupport::actualMemoryUsageMB();491 #else492 return 0;493 #endif494 }495 478 496 479 } // anonymous namespace … … 507 490 visitActiveDOMNodes(&epilogueNodeVisitor); 508 491 509 workingSetEstimateMB = getActualMemoryUsageInMB();492 workingSetEstimateMB = MemoryUsageSupport::actualMemoryUsageMB(); 510 493 511 494 #ifndef NDEBUG … … 531 514 const int highMemoryUsageMB = MemoryUsageSupport::highMemoryUsageMB(); 532 515 const int highUsageDeltaMB = MemoryUsageSupport::highUsageDeltaMB(); 533 int memoryUsageMB = getMemoryUsageInMB();516 int memoryUsageMB = MemoryUsageSupport::memoryUsageMB(); 534 517 if ((memoryUsageMB > lowMemoryUsageMB && memoryUsageMB > 2 * workingSetEstimateMB) || (memoryUsageMB > highMemoryUsageMB && memoryUsageMB > workingSetEstimateMB + highUsageDeltaMB)) 535 518 v8::V8::LowMemoryNotification(); -
trunk/Source/WebCore/platform/qt/PlatformSupport.h
r95901 r122462 93 93 static NPObject* pluginScriptableObject(Widget*); 94 94 95 // If memory usage is below this threshold, do not bother forcing GC.96 static int lowMemoryUsageMB() { return 256; }97 98 // If memory usage is above this threshold, force GC more aggressively.99 static int highMemoryUsageMB() { return 1024; }100 101 // Delta of memory usage growth (vs. last actualMemoryUsageMB()) to force GC when memory usage is high.102 static int highUsageDeltaMB() { return 128; }103 95 }; 104 96
Note: See TracChangeset
for help on using the changeset viewer.