Bug 922094 - part 1 - report proto/iface cache size to about:memory; r=njn

This commit is contained in:
Nathan Froyd 2013-11-13 16:43:25 -05:00
Родитель 967f1606e6
Коммит 39e3ffef7f
2 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -310,6 +310,11 @@ CollectWindowReports(nsGlobalWindow *aWindow,
"other 'dom/' numbers."); "other 'dom/' numbers.");
aWindowTotalSizes->mDOMOtherSize += windowSizes.mDOMOtherSize; aWindowTotalSizes->mDOMOtherSize += windowSizes.mDOMOtherSize;
REPORT_SIZE("/proto-iface-cache", windowSizes.mProtoIfaceCacheSize,
"Memory used for prototype and interface binding caches "
"with a window.");
aWindowTotalSizes->mProtoIfaceCacheSize += windowSizes.mProtoIfaceCacheSize;
REPORT_SIZE("/property-tables", REPORT_SIZE("/property-tables",
windowSizes.mPropertyTablesSize, windowSizes.mPropertyTablesSize,
"Memory used for the property tables within a window."); "Memory used for the property tables within a window.");
@ -531,6 +536,9 @@ nsWindowMemoryReporter::CollectReports(nsIMemoryReporterCallback* aCb,
REPORT("window-objects/dom/other", windowTotalSizes.mDOMOtherSize, REPORT("window-objects/dom/other", windowTotalSizes.mDOMOtherSize,
"This is the sum of all windows' 'dom/other' numbers."); "This is the sum of all windows' 'dom/other' numbers.");
REPORT("window-objects/proto-iface-cache", windowTotalSizes.mProtoIfaceCacheSize,
"This is the sum of all windows' 'proto-iface-cache' numbers.");
REPORT("window-objects/property-tables", REPORT("window-objects/property-tables",
windowTotalSizes.mPropertyTablesSize, windowTotalSizes.mPropertyTablesSize,
"This is the sum of all windows' 'property-tables' numbers."); "This is the sum of all windows' 'property-tables' numbers.");

Просмотреть файл

@ -40,6 +40,7 @@ class nsWindowSizes {
macro(Other, mLayoutTextRunsSize) \ macro(Other, mLayoutTextRunsSize) \
macro(Other, mLayoutPresContextSize) \ macro(Other, mLayoutPresContextSize) \
macro(Other, mPropertyTablesSize) \ macro(Other, mPropertyTablesSize) \
macro(Other, mProtoIfaceCacheSize) \
public: public:
nsWindowSizes(mozilla::MallocSizeOf aMallocSizeOf) nsWindowSizes(mozilla::MallocSizeOf aMallocSizeOf)