Bug 1462784 - Rename the CSS category to LAYOUT. r?njn
The next changeset is going to move over more annotations that Gecko developers
would count as "layout" into the LAYOUT category, and which is currently marked
as GRAPHICS.
We can add a subcategory for style resolution once we have subcategories, but
for now I think it makes more sense to put style resolution into the same bucket
as reflow and display list building.
MozReview-Commit-ID: 7r9eICVBA1Z
--- a/js/public/ProfilingStack.h
+++ b/js/public/ProfilingStack.h
@@ -186,17 +186,17 @@ class ProfilingStackFrame
KIND_BITCOUNT = 2,
KIND_MASK = (1 << KIND_BITCOUNT) - 1
};
// Keep these in sync with devtools/client/performance/modules/categories.js
enum class Category : uint32_t {
OTHER,
- CSS,
+ LAYOUT,
JS,
GCCC,
NETWORK,
GRAPHICS,
STORAGE,
FIRST = OTHER,
LAST = STORAGE,
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1305,17 +1305,17 @@ RestyleManager::ProcessRestyledFrames(ns
}
};
MaybeClearDestroyedFrames maybeClear(mDestroyedFrames);
if (!mDestroyedFrames) {
mDestroyedFrames = MakeUnique<nsTHashtable<nsPtrHashKey<const nsIFrame>>>();
}
- AUTO_PROFILER_LABEL("RestyleManager::ProcessRestyledFrames", CSS);
+ AUTO_PROFILER_LABEL("RestyleManager::ProcessRestyledFrames", LAYOUT);
nsPresContext* presContext = PresContext();
nsCSSFrameConstructor* frameConstructor = presContext->FrameConstructor();
// Handle nsChangeHint_CSSOverflowChange, by either updating the
// scrollbars on the viewport, or upgrading the change hint to frame-reconstruct.
for (nsStyleChangeData& data : aChangeList) {
if (data.mHint & nsChangeHint_CSSOverflowChange) {
--- a/layout/style/ComputedStyle.cpp
+++ b/layout/style/ComputedStyle.cpp
@@ -56,17 +56,17 @@ ComputedStyle::ComputedStyle(nsPresConte
MOZ_ASSERT(ComputedData());
}
nsChangeHint
ComputedStyle::CalcStyleDifference(ComputedStyle* aNewContext,
uint32_t* aEqualStructs)
{
MOZ_ASSERT(aNewContext);
- AUTO_PROFILER_LABEL("ComputedStyle::CalcStyleDifference", CSS);
+ AUTO_PROFILER_LABEL("ComputedStyle::CalcStyleDifference", LAYOUT);
static_assert(StyleStructConstants::kStyleStructCount <= 32,
"aEqualStructs is not big enough");
*aEqualStructs = 0;
nsChangeHint hint = nsChangeHint(0);
// We must always ensure that we populate the structs on the new style
// context that are filled in on the old context, so that if we get
--- a/tools/profiler/tests/gtest/GeckoProfiler.cpp
+++ b/tools/profiler/tests/gtest/GeckoProfiler.cpp
@@ -474,19 +474,19 @@ TEST(GeckoProfiler, Markers)
for (size_t i = 0; i < kMax; i++) {
okstr1[i] = 'a';
okstr2[i] = 'b';
longstr[i] = 'c';
}
okstr1[kMax - 1] = '\0';
okstr2[kMax - 1] = '\0';
longstr[kMax] = '\0';
- AUTO_PROFILER_LABEL_DYNAMIC_CSTR("", CSS, okstr1.get());
- AUTO_PROFILER_LABEL_DYNAMIC_CSTR("okstr2", CSS, okstr2.get());
- AUTO_PROFILER_LABEL_DYNAMIC_CSTR("", CSS, longstr.get());
+ AUTO_PROFILER_LABEL_DYNAMIC_CSTR("", LAYOUT, okstr1.get());
+ AUTO_PROFILER_LABEL_DYNAMIC_CSTR("okstr2", LAYOUT, okstr2.get());
+ AUTO_PROFILER_LABEL_DYNAMIC_CSTR("", LAYOUT, longstr.get());
// Sleep briefly to ensure a sample is taken and the pending markers are
// processed.
PR_Sleep(PR_MillisecondsToInterval(500));
SpliceableChunkedJSONWriter w;
ASSERT_TRUE(profiler_stream_json_for_this_process(w));