Source/JavaScriptCore: Export fastMallocStatistics and Heap::objectTypeCounts for...
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2011 15:09:50 +0000 (15:09 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2011 15:09:50 +0000 (15:09 +0000)
commita2a83c3ffb88d5b040244f62ee084bf74c1240bc
treef410c841a7ac658bc18895a920419db9917466c2
parent4b785a00d9ee0e269d0f3b1557386ed662f1f436
Source/JavaScriptCore: Export fastMallocStatistics and Heap::objectTypeCounts for https://bugs.webkit.org/show_bug.cgi?id=67160.

Reviewed by Darin Adler.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

Source/WebKit2: Gather JavaScript, FastMalloc, icon, font, and glyph page statistics in WebProcess::getWebCoreStatistics().
https://bugs.webkit.org/show_bug.cgi?id=67160

Reviewed by Darin Adler.

Encode and decode the data members in StatisticsData.
* Shared/StatisticsData.cpp:
(WebKit::StatisticsData::encode):
(WebKit::StatisticsData::decode):
(WebKit::StatisticsData::StatisticsData):

Add three data members to StatisticsData:
- statisticsNumbers: Map containing statistics values that are numbers, mapped by their names, such as
JavaScriptObjectsCount, CachedFontDataCount, etc.
- javaScriptProtectedObjectTypeCounts
- javaScriptObjectTypeCounts
* Shared/StatisticsData.h:

Create a WK::Dictionary containing statistics values mapped by their names and return that dictionary
in WebContext::didGetWebCoreStatistics().
* UIProcess/WebContext.cpp:
(WebKit::createDictionaryFromHashMap):
(WebKit::WebContext::didGetWebCoreStatistics):

Package JavaScript, FastMalloc, icon, font, and glyph page statistics into a StatisticsData object
and send it to the UIProcess.
* WebProcess/WebProcess.cpp:
(WebKit::fromCountedSetToHashMap):
(WebKit::WebProcess::getWebCoreStatistics):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/StatisticsData.cpp
Source/WebKit2/Shared/StatisticsData.h
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/WebProcess/WebProcess.cpp