Bug 922094 - part 1 - report proto/iface cache size to about:memory; r=njn
authorNathan Froyd <froydnj@mozilla.com>
Thu, 21 Nov 2013 09:13:31 -0500
changeset 174747 54405d36e0fbc3b0151404accdc09efb05d4e147
parent 174746 20e4d6b3c819cdf36a25dc253217d55611104db2
child 174748 837a6f6f4c2f2a4fcb9152ce8ae941b8eee2bef5
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs922094
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 922094 - part 1 - report proto/iface cache size to about:memory; r=njn This is just the nsWindowMemoryReporter bits; the actual measurements come later.
dom/base/nsWindowMemoryReporter.cpp
dom/base/nsWindowMemoryReporter.h
--- a/dom/base/nsWindowMemoryReporter.cpp
+++ b/dom/base/nsWindowMemoryReporter.cpp
@@ -305,16 +305,21 @@ CollectWindowReports(nsGlobalWindow *aWi
   aWindowTotalSizes->mDOMEventListenersCount +=
     windowSizes.mDOMEventListenersCount;
 
   REPORT_SIZE("/dom/other", windowSizes.mDOMOtherSize,
               "Memory used by a window's DOM that isn't measured by the "
               "other 'dom/' numbers.");
   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",
               windowSizes.mPropertyTablesSize,
               "Memory used for the property tables within a window.");
   aWindowTotalSizes->mPropertyTablesSize += windowSizes.mPropertyTablesSize;
 
   REPORT_SIZE("/style-sheets", windowSizes.mStyleSheetsSize,
               "Memory used by style sheets within a window.");
   aWindowTotalSizes->mStyleSheetsSize += windowSizes.mStyleSheetsSize;
@@ -519,16 +524,19 @@ nsWindowMemoryReporter::CollectReports(n
          "This is the sum of all windows' 'dom/comment-nodes' numbers.");
 
   REPORT("window-objects/dom/event-targets", windowTotalSizes.mDOMEventTargetsSize,
          "This is the sum of all windows' 'dom/event-targets' numbers.");
 
   REPORT("window-objects/dom/other", windowTotalSizes.mDOMOtherSize,
          "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",
          windowTotalSizes.mPropertyTablesSize,
          "This is the sum of all windows' 'property-tables' numbers.");
 
   REPORT("window-objects/style-sheets", windowTotalSizes.mStyleSheetsSize,
          "This is the sum of all windows' 'style-sheets' numbers.");
 
   REPORT("window-objects/layout/pres-shell", windowTotalSizes.mLayoutPresShellSize,
--- a/dom/base/nsWindowMemoryReporter.h
+++ b/dom/base/nsWindowMemoryReporter.h
@@ -35,16 +35,17 @@ class nsWindowSizes {
   macro(DOM,   mDOMEventTargetsSize) \
   macro(DOM,   mDOMOtherSize) \
   macro(Style, mStyleSheetsSize) \
   macro(Other, mLayoutPresShellSize) \
   macro(Style, mLayoutStyleSetsSize) \
   macro(Other, mLayoutTextRunsSize) \
   macro(Other, mLayoutPresContextSize) \
   macro(Other, mPropertyTablesSize) \
+  macro(Other, mProtoIfaceCacheSize) \
 
 public:
   nsWindowSizes(mozilla::MallocSizeOf aMallocSizeOf)
     :
       #define ZERO_SIZE(kind, mSize)  mSize(0),
       FOR_EACH_SIZE(ZERO_SIZE)
       #undef ZERO_SIZE
       mDOMEventTargetsCount(0),