зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448728 part 2 - Remove style sizes for the old style system from nsWindowSizes.h. r=njn
MozReview-Commit-ID: 5FqJWoCjlto --HG-- extra : source : 261d5942b8ee9fb178726bef0691d6ec70e72b6c
This commit is contained in:
Родитель
1962625a79
Коммит
160053e9ab
|
@ -358,9 +358,6 @@ CollectWindowReports(nsGlobalWindowInner *aWindow,
|
|||
"allocated in its arena and not measured elsewhere, "
|
||||
"within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/gecko-style-sets", mLayoutGeckoStyleSets,
|
||||
"Memory used by Gecko style sets within a window.");
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/rule-tree",
|
||||
mLayoutServoStyleSetsStylistRuleTree,
|
||||
"Memory used by rule trees within Servo style sets within a "
|
||||
|
@ -451,34 +448,6 @@ CollectWindowReports(nsGlobalWindowInner *aWindow,
|
|||
const size_t STYLE_SUNDRIES_THRESHOLD =
|
||||
js::MemoryReportingSundriesThreshold();
|
||||
|
||||
// This is the Gecko style structs, which are in the nsPresArena.
|
||||
size_t geckoStyleSundriesSize = 0;
|
||||
#define STYLE_STRUCT(name_) \
|
||||
{ \
|
||||
size_t size = \
|
||||
windowSizes.mArenaSizes.mGeckoStyleSizes.NS_STYLE_SIZES_FIELD(name_); \
|
||||
if (size < STYLE_SUNDRIES_THRESHOLD) { \
|
||||
geckoStyleSundriesSize += size; \
|
||||
} else { \
|
||||
REPORT_SUM_SIZE( \
|
||||
"/layout/gecko-style-structs/" # name_, size, \
|
||||
"Memory used by the " #name_ " Gecko style structs within a window."); \
|
||||
} \
|
||||
aWindowTotalSizes->mArenaSizes.mGeckoStyleSizes.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 (geckoStyleSundriesSize > 0) {
|
||||
REPORT_SUM_SIZE(
|
||||
"/layout/gecko-style-structs/sundries", geckoStyleSundriesSize,
|
||||
"The sum of all memory used by Gecko style structs which were too small "
|
||||
"to be shown individually.");
|
||||
}
|
||||
|
||||
// There are many different kinds of frames, but it is very likely
|
||||
// that only a few matter. Implement a cutoff so we don't bloat
|
||||
// about:memory with many uninteresting entries.
|
||||
|
@ -660,10 +629,6 @@ nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
|
|||
windowTotalSizes.mLayoutPresShellSize,
|
||||
"This is the sum of all windows' 'layout/arenas' numbers.");
|
||||
|
||||
REPORT("window-objects/layout/gecko-style-sets",
|
||||
windowTotalSizes.mLayoutGeckoStyleSets,
|
||||
"This is the sum of all windows' 'layout/gecko-style-sets' numbers.");
|
||||
|
||||
REPORT("window-objects/layout/servo-style-sets",
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistRuleTree +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistElementAndPseudosMaps +
|
||||
|
@ -711,19 +676,6 @@ nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
|
|||
windowTotalSizes.mArenaSizes.mComputedStyles,
|
||||
"This is the sum of all windows' 'layout/style-contexts' numbers.");
|
||||
|
||||
size_t geckoStyleTotal = 0;
|
||||
#define STYLE_STRUCT(name_) \
|
||||
geckoStyleTotal += \
|
||||
windowTotalSizes.mArenaSizes.mGeckoStyleSizes.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/gecko-style-structs", geckoStyleTotal,
|
||||
"Memory used for style structs within windows. This is the sum of "
|
||||
"all windows' 'layout/gecko-style-structs/' numbers.");
|
||||
|
||||
size_t frameTotal = 0;
|
||||
#define FRAME_ID(classname, ...) \
|
||||
frameTotal += windowTotalSizes.mArenaSizes.NS_ARENA_SIZES_FIELD(classname);
|
||||
|
|
|
@ -116,7 +116,7 @@ struct nsArenaSizes {
|
|||
#undef FRAME_ID
|
||||
#undef ABSTRACT_FRAME_ID
|
||||
|
||||
mGeckoStyleSizes()
|
||||
dummy()
|
||||
{}
|
||||
|
||||
void addToTabSizes(nsTabSizes* aSizes) const
|
||||
|
@ -129,8 +129,6 @@ struct nsArenaSizes {
|
|||
#include "nsFrameIdList.h"
|
||||
#undef FRAME_ID
|
||||
#undef ABSTRACT_FRAME_ID
|
||||
|
||||
mGeckoStyleSizes.addToTabSizes(aSizes);
|
||||
}
|
||||
|
||||
size_t getTotalSize() const
|
||||
|
@ -146,8 +144,6 @@ struct nsArenaSizes {
|
|||
#undef FRAME_ID
|
||||
#undef ABSTRACT_FRAME_ID
|
||||
|
||||
total += mGeckoStyleSizes.getTotalSize();
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
|
@ -160,9 +156,8 @@ struct nsArenaSizes {
|
|||
#undef FRAME_ID
|
||||
#undef ABSTRACT_FRAME_ID
|
||||
|
||||
// This is Gecko-only because in Stylo these style structs are stored outside
|
||||
// the nsPresArena, and so measured elsewhere.
|
||||
nsStyleSizes mGeckoStyleSizes;
|
||||
// Present just to absorb the trailing comma in the constructor.
|
||||
int dummy;
|
||||
|
||||
#undef FOR_EACH_SIZE
|
||||
};
|
||||
|
@ -180,7 +175,6 @@ class nsWindowSizes
|
|||
macro(DOM, mDOMOtherSize) \
|
||||
macro(Style, mLayoutStyleSheetsSize) \
|
||||
macro(Other, mLayoutPresShellSize) \
|
||||
macro(Style, mLayoutGeckoStyleSets) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistRuleTree) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistElementAndPseudosMaps) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistInvalidationMap) \
|
||||
|
@ -233,8 +227,6 @@ public:
|
|||
|
||||
nsArenaSizes mArenaSizes;
|
||||
|
||||
// This is Stylo-only because in Gecko these style structs are stored in the
|
||||
// nsPresArena, and so are measured as part of that.
|
||||
nsStyleSizes mServoStyleSizes;
|
||||
|
||||
mozilla::SizeOfState& mState;
|
||||
|
|
Загрузка…
Ссылка в новой задаче