Bug 1462784 - Rename the CSS category to LAYOUT. r?njn draft
authorMarkus Stange <mstange@themasta.com>
Fri, 18 May 2018 17:40:52 -0400
changeset 803061 5eb15ad5a529dbb006cf0104699575dc24d45b06
parent 803060 d8a5f0071f8b744997914d5b0828d02943e4307b
child 803062 e1947ee3b46a48d21ec0c70a787716613803d0d6
push id112022
push userbmo:mstange@themasta.com
push dateFri, 01 Jun 2018 21:00:49 +0000
reviewersnjn
bugs1462784
milestone62.0a1
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
js/public/ProfilingStack.h
layout/base/RestyleManager.cpp
layout/style/ComputedStyle.cpp
tools/profiler/tests/gtest/GeckoProfiler.cpp
--- 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));