Modified: trunk/Source/WebKit/ChangeLog (258334 => 258335)
--- trunk/Source/WebKit/ChangeLog 2020-03-12 16:28:22 UTC (rev 258334)
+++ trunk/Source/WebKit/ChangeLog 2020-03-12 16:32:25 UTC (rev 258335)
@@ -1,3 +1,18 @@
+2020-03-12 Alex Christensen <achristen...@webkit.org>
+
+ Remove unused GetWebCoreStatistics message
+ https://bugs.webkit.org/show_bug.cgi?id=209001
+ <rdar://problem/59682747>
+
+ Reviewed by Chris Dumez.
+
+ * WebProcess/WebProcess.cpp:
+ (WebKit::fromCountedSetToHashMap): Deleted.
+ (WebKit::getWebCoreMemoryCacheStatistics): Deleted.
+ (WebKit::WebProcess::getWebCoreStatistics): Deleted.
+ * WebProcess/WebProcess.h:
+ * WebProcess/WebProcess.messages.in:
+
2020-03-12 David Kilzer <ddkil...@apple.com>
WebPasteboardProxy::SetPasteboardBufferForType should validate its `size` parameter
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (258334 => 258335)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2020-03-12 16:28:22 UTC (rev 258334)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2020-03-12 16:32:25 UTC (rev 258335)
@@ -1029,93 +1029,6 @@
#endif
}
-static void fromCountedSetToHashMap(TypeCountSet* countedSet, HashMap<String, uint64_t>& map)
-{
- TypeCountSet::const_iterator end = countedSet->end();
- for (TypeCountSet::const_iterator it = countedSet->begin(); it != end; ++it)
- map.set(it->key, it->value);
-}
-
-static void getWebCoreMemoryCacheStatistics(Vector<HashMap<String, uint64_t>>& result)
-{
- String imagesString("Images"_s);
- String cssString("CSS"_s);
- String xslString("XSL"_s);
- String _javascript_String("_javascript_"_s);
-
- MemoryCache::Statistics memoryCacheStatistics = MemoryCache::singleton().getStatistics();
-
- HashMap<String, uint64_t> counts;
- counts.set(imagesString, memoryCacheStatistics.images.count);
- counts.set(cssString, memoryCacheStatistics.cssStyleSheets.count);
- counts.set(xslString, memoryCacheStatistics.xslStyleSheets.count);
- counts.set(_javascript_String, memoryCacheStatistics.scripts.count);
- result.append(counts);
-
- HashMap<String, uint64_t> sizes;
- sizes.set(imagesString, memoryCacheStatistics.images.size);
- sizes.set(cssString, memoryCacheStatistics.cssStyleSheets.size);
- sizes.set(xslString, memoryCacheStatistics.xslStyleSheets.size);
- sizes.set(_javascript_String, memoryCacheStatistics.scripts.size);
- result.append(sizes);
-
- HashMap<String, uint64_t> liveSizes;
- liveSizes.set(imagesString, memoryCacheStatistics.images.liveSize);
- liveSizes.set(cssString, memoryCacheStatistics.cssStyleSheets.liveSize);
- liveSizes.set(xslString, memoryCacheStatistics.xslStyleSheets.liveSize);
- liveSizes.set(_javascript_String, memoryCacheStatistics.scripts.liveSize);
- result.append(liveSizes);
-
- HashMap<String, uint64_t> decodedSizes;
- decodedSizes.set(imagesString, memoryCacheStatistics.images.decodedSize);
- decodedSizes.set(cssString, memoryCacheStatistics.cssStyleSheets.decodedSize);
- decodedSizes.set(xslString, memoryCacheStatistics.xslStyleSheets.decodedSize);
- decodedSizes.set(_javascript_String, memoryCacheStatistics.scripts.decodedSize);
- result.append(decodedSizes);
-}
-
-void WebProcess::getWebCoreStatistics(uint64_t callbackID)
-{
- StatisticsData data;
-
- // Gather _javascript_ statistics.
- {
- JSLockHolder lock(commonVM());
- data.statisticsNumbers.set("_javascript_ObjectsCount"_s, commonVM().heap.objectCount());
- data.statisticsNumbers.set("_javascript_GlobalObjectsCount"_s, commonVM().heap.globalObjectCount());
- data.statisticsNumbers.set("_javascript_ProtectedObjectsCount"_s, commonVM().heap.protectedObjectCount());
- data.statisticsNumbers.set("_javascript_ProtectedGlobalObjectsCount"_s, commonVM().heap.protectedGlobalObjectCount());
-
- std::unique_ptr<TypeCountSet> protectedObjectTypeCounts(commonVM().heap.protectedObjectTypeCounts());
- fromCountedSetToHashMap(protectedObjectTypeCounts.get(), data._javascript_ProtectedObjectTypeCounts);
-
- std::unique_ptr<TypeCountSet> objectTypeCounts(commonVM().heap.objectTypeCounts());
- fromCountedSetToHashMap(objectTypeCounts.get(), data._javascript_ObjectTypeCounts);
-
- uint64_t _javascript_HeapSize = commonVM().heap.size();
- data.statisticsNumbers.set("_javascript_HeapSize"_s, _javascript_HeapSize);
- data.statisticsNumbers.set("_javascript_FreeSize"_s, commonVM().heap.capacity() - _javascript_HeapSize);
- }
-
- WTF::FastMallocStatistics fastMallocStatistics = WTF::fastMallocStatistics();
- data.statisticsNumbers.set("FastMallocReservedVMBytes"_s, fastMallocStatistics.reservedVMBytes);
- data.statisticsNumbers.set("FastMallocCommittedVMBytes"_s, fastMallocStatistics.committedVMBytes);
- data.statisticsNumbers.set("FastMallocFreeListBytes"_s, fastMallocStatistics.freeListBytes);
-
- // Gather font statistics.
- auto& fontCache = FontCache::singleton();
- data.statisticsNumbers.set("CachedFontDataCount"_s, fontCache.fontCount());
- data.statisticsNumbers.set("CachedFontDataInactiveCount"_s, fontCache.inactiveFontCount());
-
- // Gather glyph page statistics.
- data.statisticsNumbers.set("GlyphPageCount"_s, GlyphPage::count());
-
- // Get WebCore memory cache statistics
- getWebCoreMemoryCacheStatistics(data.webCoreCacheStatistics);
-
- parentProcessConnection()->send(Messages::WebProcessPool::DidGetStatistics(data, callbackID), 0);
-}
-
void WebProcess::garbageCollectJavaScriptObjects()
{
GCController::singleton().garbageCollectNow();
Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (258334 => 258335)
--- trunk/Source/WebKit/WebProcess/WebProcess.h 2020-03-12 16:28:22 UTC (rev 258334)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h 2020-03-12 16:32:25 UTC (rev 258335)
@@ -392,7 +392,6 @@
void startMemorySampler(SandboxExtension::Handle&&, const String&, const double);
void stopMemorySampler();
- void getWebCoreStatistics(uint64_t callbackID);
void garbageCollectJavaScriptObjects();
void setJavaScriptGarbageCollectorTimerEnabled(bool flag);
Modified: trunk/Source/WebKit/WebProcess/WebProcess.messages.in (258334 => 258335)
--- trunk/Source/WebKit/WebProcess/WebProcess.messages.in 2020-03-12 16:28:22 UTC (rev 258334)
+++ trunk/Source/WebKit/WebProcess/WebProcess.messages.in 2020-03-12 16:32:25 UTC (rev 258335)
@@ -67,7 +67,6 @@
SetEnhancedAccessibility(bool flag)
- GetWebCoreStatistics(uint64_t callbackID)
GarbageCollectJavaScriptObjects()
SetJavaScriptGarbageCollectorTimerEnabled(bool enable)