Bug 1448728 part 3 - Remove mention of servo in memory report as it's the only style system now. r=njn
MozReview-Commit-ID: CJl0LboV1Gj
This commit is contained in:
@@ -4362,7 +4362,7 @@ Element::AddSizeOfExcludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const
|
||||
|
||||
if (HasServoData()) {
|
||||
// Measure the ElementData object itself.
|
||||
aSizes.mLayoutServoElementDataObjects +=
|
||||
aSizes.mLayoutElementDataObjects +=
|
||||
aSizes.mState.mMallocSizeOf(mServoData.Get());
|
||||
|
||||
// Measure mServoData, excluding the ComputedValues. This measurement
|
||||
|
||||
@@ -358,38 +358,36 @@ CollectWindowReports(nsGlobalWindowInner *aWindow,
|
||||
"allocated in its arena and not measured elsewhere, "
|
||||
"within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/rule-tree",
|
||||
mLayoutServoStyleSetsStylistRuleTree,
|
||||
"Memory used by rule trees within Servo style sets within a "
|
||||
"window.");
|
||||
REPORT_SIZE("/layout/style-sets/stylist/rule-tree",
|
||||
mLayoutStyleSetsStylistRuleTree,
|
||||
"Memory used by rule trees within style sets within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/element-and-pseudos-maps",
|
||||
mLayoutServoStyleSetsStylistElementAndPseudosMaps,
|
||||
"Memory used by element and pseudos maps within Servo style "
|
||||
REPORT_SIZE("/layout/style-sets/stylist/element-and-pseudos-maps",
|
||||
mLayoutStyleSetsStylistElementAndPseudosMaps,
|
||||
"Memory used by element and pseudos maps within style "
|
||||
"sets within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/invalidation-map",
|
||||
mLayoutServoStyleSetsStylistInvalidationMap,
|
||||
"Memory used by invalidation maps within Servo style sets "
|
||||
REPORT_SIZE("/layout/style-sets/stylist/invalidation-map",
|
||||
mLayoutStyleSetsStylistInvalidationMap,
|
||||
"Memory used by invalidation maps within style sets "
|
||||
"within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/revalidation-selectors",
|
||||
mLayoutServoStyleSetsStylistRevalidationSelectors,
|
||||
"Memory used by selectors for cache revalidation within Servo "
|
||||
REPORT_SIZE("/layout/style-sets/stylist/revalidation-selectors",
|
||||
mLayoutStyleSetsStylistRevalidationSelectors,
|
||||
"Memory used by selectors for cache revalidation within "
|
||||
"style sets within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/other",
|
||||
mLayoutServoStyleSetsStylistOther,
|
||||
"Memory used by other Stylist data within Servo style sets "
|
||||
REPORT_SIZE("/layout/style-sets/stylist/other",
|
||||
mLayoutStyleSetsStylistOther,
|
||||
"Memory used by other Stylist data within style sets "
|
||||
"within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/other", mLayoutServoStyleSetsOther,
|
||||
"Memory used by other parts of Servo style sets within a "
|
||||
"window.");
|
||||
REPORT_SIZE("/layout/style-sets/other", mLayoutStyleSetsOther,
|
||||
"Memory used by other parts of style sets within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/servo-element-data-objects",
|
||||
mLayoutServoElementDataObjects,
|
||||
"Memory used for Servo ElementData objects, but not the things"
|
||||
REPORT_SIZE("/layout/element-data-objects",
|
||||
mLayoutElementDataObjects,
|
||||
"Memory used for ElementData objects, but not the things"
|
||||
"hanging off them.");
|
||||
|
||||
REPORT_SIZE("/layout/text-runs", mLayoutTextRunsSize,
|
||||
@@ -479,29 +477,29 @@ CollectWindowReports(nsGlobalWindowInner *aWindow,
|
||||
"individually.");
|
||||
}
|
||||
|
||||
// This is the Servo style structs.
|
||||
size_t servoStyleSundriesSize = 0;
|
||||
// This is the style structs.
|
||||
size_t styleSundriesSize = 0;
|
||||
#define STYLE_STRUCT(name_) \
|
||||
{ \
|
||||
size_t size = windowSizes.mServoStyleSizes.NS_STYLE_SIZES_FIELD(name_); \
|
||||
size_t size = windowSizes.mStyleSizes.NS_STYLE_SIZES_FIELD(name_); \
|
||||
if (size < STYLE_SUNDRIES_THRESHOLD) { \
|
||||
servoStyleSundriesSize += size; \
|
||||
styleSundriesSize += size; \
|
||||
} else { \
|
||||
REPORT_SUM_SIZE( \
|
||||
"/layout/servo-style-structs/" # name_, size, \
|
||||
"Memory used by the " #name_ " Servo style structs within a window."); \
|
||||
"/layout/style-structs/" # name_, size, \
|
||||
"Memory used by the " #name_ " style structs within a window."); \
|
||||
} \
|
||||
aWindowTotalSizes->mServoStyleSizes.NS_STYLE_SIZES_FIELD(name_) += size; \
|
||||
aWindowTotalSizes->mStyleSizes.NS_STYLE_SIZES_FIELD(name_) += size; \
|
||||
}
|
||||
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
|
||||
#include "nsStyleStructList.h"
|
||||
#undef STYLE_STRUCT
|
||||
#undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
|
||||
|
||||
if (servoStyleSundriesSize > 0) {
|
||||
if (styleSundriesSize > 0) {
|
||||
REPORT_SUM_SIZE(
|
||||
"/layout/servo-style-structs/sundries", servoStyleSundriesSize,
|
||||
"The sum of all memory used by Servo style structs which were too "
|
||||
"/layout/style-structs/sundries", styleSundriesSize,
|
||||
"The sum of all memory used by style structs which were too "
|
||||
"small to be shown individually.");
|
||||
}
|
||||
|
||||
@@ -629,18 +627,18 @@ nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
windowTotalSizes.mLayoutPresShellSize,
|
||||
"This is the sum of all windows' 'layout/arenas' numbers.");
|
||||
|
||||
REPORT("window-objects/layout/servo-style-sets",
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistRuleTree +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistElementAndPseudosMaps +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistInvalidationMap +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistRevalidationSelectors +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistOther +
|
||||
windowTotalSizes.mLayoutServoStyleSetsOther,
|
||||
"This is the sum of all windows' 'layout/servo-style-sets/' numbers.");
|
||||
REPORT("window-objects/layout/style-sets",
|
||||
windowTotalSizes.mLayoutStyleSetsStylistRuleTree +
|
||||
windowTotalSizes.mLayoutStyleSetsStylistElementAndPseudosMaps +
|
||||
windowTotalSizes.mLayoutStyleSetsStylistInvalidationMap +
|
||||
windowTotalSizes.mLayoutStyleSetsStylistRevalidationSelectors +
|
||||
windowTotalSizes.mLayoutStyleSetsStylistOther +
|
||||
windowTotalSizes.mLayoutStyleSetsOther,
|
||||
"This is the sum of all windows' 'layout/style-sets/' numbers.");
|
||||
|
||||
REPORT("window-objects/layout/servo-element-data-objects",
|
||||
windowTotalSizes.mLayoutServoElementDataObjects,
|
||||
"This is the sum of all windows' 'layout/servo-element-data-objects' "
|
||||
REPORT("window-objects/layout/element-data-objects",
|
||||
windowTotalSizes.mLayoutElementDataObjects,
|
||||
"This is the sum of all windows' 'layout/element-data-objects' "
|
||||
"numbers.");
|
||||
|
||||
REPORT("window-objects/layout/text-runs", windowTotalSizes.mLayoutTextRunsSize,
|
||||
@@ -688,18 +686,18 @@ nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
"Memory used for layout frames within windows. "
|
||||
"This is the sum of all windows' 'layout/frames/' numbers.");
|
||||
|
||||
size_t servoStyleTotal = 0;
|
||||
size_t styleTotal = 0;
|
||||
#define STYLE_STRUCT(name_) \
|
||||
servoStyleTotal += \
|
||||
windowTotalSizes.mServoStyleSizes.NS_STYLE_SIZES_FIELD(name_);
|
||||
styleTotal += \
|
||||
windowTotalSizes.mStyleSizes.NS_STYLE_SIZES_FIELD(name_);
|
||||
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
|
||||
#include "nsStyleStructList.h"
|
||||
#undef STYLE_STRUCT
|
||||
#undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
|
||||
|
||||
REPORT("window-objects/layout/servo-style-structs", servoStyleTotal,
|
||||
REPORT("window-objects/layout/style-structs", styleTotal,
|
||||
"Memory used for style structs within windows. This is the sum of "
|
||||
"all windows' 'layout/servo-style-structs/' numbers.");
|
||||
"all windows' 'layout/style-structs/' numbers.");
|
||||
|
||||
#undef REPORT
|
||||
|
||||
|
||||
@@ -175,13 +175,13 @@ class nsWindowSizes
|
||||
macro(DOM, mDOMOtherSize) \
|
||||
macro(Style, mLayoutStyleSheetsSize) \
|
||||
macro(Other, mLayoutPresShellSize) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistRuleTree) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistElementAndPseudosMaps) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistInvalidationMap) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistRevalidationSelectors) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistOther) \
|
||||
macro(Style, mLayoutServoStyleSetsOther) \
|
||||
macro(Style, mLayoutServoElementDataObjects) \
|
||||
macro(Style, mLayoutStyleSetsStylistRuleTree) \
|
||||
macro(Style, mLayoutStyleSetsStylistElementAndPseudosMaps) \
|
||||
macro(Style, mLayoutStyleSetsStylistInvalidationMap) \
|
||||
macro(Style, mLayoutStyleSetsStylistRevalidationSelectors) \
|
||||
macro(Style, mLayoutStyleSetsStylistOther) \
|
||||
macro(Style, mLayoutStyleSetsOther) \
|
||||
macro(Style, mLayoutElementDataObjects) \
|
||||
macro(Other, mLayoutTextRunsSize) \
|
||||
macro(Other, mLayoutPresContextSize) \
|
||||
macro(Other, mLayoutFramePropertiesSize) \
|
||||
@@ -199,14 +199,14 @@ public:
|
||||
mDOMEventTargetsCount(0),
|
||||
mDOMEventListenersCount(0),
|
||||
mArenaSizes(),
|
||||
mServoStyleSizes(),
|
||||
mStyleSizes(),
|
||||
mState(aState)
|
||||
{}
|
||||
|
||||
void addToTabSizes(nsTabSizes* aSizes) const {
|
||||
FOR_EACH_SIZE(ADD_TO_TAB_SIZES)
|
||||
mArenaSizes.addToTabSizes(aSizes);
|
||||
mServoStyleSizes.addToTabSizes(aSizes);
|
||||
mStyleSizes.addToTabSizes(aSizes);
|
||||
}
|
||||
|
||||
size_t getTotalSize() const
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
|
||||
FOR_EACH_SIZE(ADD_TO_TOTAL_SIZE)
|
||||
total += mArenaSizes.getTotalSize();
|
||||
total += mServoStyleSizes.getTotalSize();
|
||||
total += mStyleSizes.getTotalSize();
|
||||
|
||||
return total;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
|
||||
nsArenaSizes mArenaSizes;
|
||||
|
||||
nsStyleSizes mServoStyleSizes;
|
||||
nsStyleSizes mStyleSizes;
|
||||
|
||||
mozilla::SizeOfState& mState;
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ ServoComputedData::AddSizeOfExcludingThis(nsWindowSizes& aSizes) const
|
||||
"alignment will break AddSizeOfExcludingThis()"); \
|
||||
const void* p##name_ = GetStyle##name_(); \
|
||||
if (!aSizes.mState.HaveSeenPtr(p##name_)) { \
|
||||
aSizes.mServoStyleSizes.NS_STYLE_SIZES_FIELD(name_) += \
|
||||
aSizes.mStyleSizes.NS_STYLE_SIZES_FIELD(name_) += \
|
||||
ServoStyleStructsMallocEnclosingSizeOf(p##name_); \
|
||||
}
|
||||
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
|
||||
|
||||
@@ -341,10 +341,10 @@ ServoStyleSet::AddSizeOfIncludingThis(nsWindowSizes& aSizes) const
|
||||
{
|
||||
MallocSizeOf mallocSizeOf = aSizes.mState.mMallocSizeOf;
|
||||
|
||||
aSizes.mLayoutServoStyleSetsOther += mallocSizeOf(this);
|
||||
aSizes.mLayoutStyleSetsOther += mallocSizeOf(this);
|
||||
|
||||
if (mRawSet) {
|
||||
aSizes.mLayoutServoStyleSetsOther += mallocSizeOf(mRawSet.get());
|
||||
aSizes.mLayoutStyleSetsOther += mallocSizeOf(mRawSet.get());
|
||||
ServoStyleSetSizes sizes;
|
||||
// Measure mRawSet. We use ServoStyleSetMallocSizeOf rather than
|
||||
// aMallocSizeOf to distinguish in DMD's output the memory measured within
|
||||
@@ -357,18 +357,18 @@ ServoStyleSet::AddSizeOfIncludingThis(nsWindowSizes& aSizes) const
|
||||
// cache.
|
||||
MOZ_RELEASE_ASSERT(sizes.mPrecomputedPseudos == 0);
|
||||
|
||||
aSizes.mLayoutServoStyleSetsStylistRuleTree += sizes.mRuleTree;
|
||||
aSizes.mLayoutServoStyleSetsStylistElementAndPseudosMaps +=
|
||||
aSizes.mLayoutStyleSetsStylistRuleTree += sizes.mRuleTree;
|
||||
aSizes.mLayoutStyleSetsStylistElementAndPseudosMaps +=
|
||||
sizes.mElementAndPseudosMaps;
|
||||
aSizes.mLayoutServoStyleSetsStylistInvalidationMap +=
|
||||
aSizes.mLayoutStyleSetsStylistInvalidationMap +=
|
||||
sizes.mInvalidationMap;
|
||||
aSizes.mLayoutServoStyleSetsStylistRevalidationSelectors +=
|
||||
aSizes.mLayoutStyleSetsStylistRevalidationSelectors +=
|
||||
sizes.mRevalidationSelectors;
|
||||
aSizes.mLayoutServoStyleSetsStylistOther += sizes.mOther;
|
||||
aSizes.mLayoutStyleSetsStylistOther += sizes.mOther;
|
||||
}
|
||||
|
||||
if (mStyleRuleMap) {
|
||||
aSizes.mLayoutServoStyleSetsOther +=
|
||||
aSizes.mLayoutStyleSetsOther +=
|
||||
mStyleRuleMap->SizeOfIncludingThis(aSizes.mState.mMallocSizeOf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user