Bug 1462784 - Rename the CSS category to LAYOUT. r=njn
authorMarkus Stange <mstange@themasta.com>
Fri, 18 May 2018 17:40:52 -0400
changeset 475267 3ba0b75a1419348dea3127e759395ee28984eeac
parent 475266 6dc964ee521c253dd0c5e33b8861788dc3ff70d3
child 475268 88a612098ee5c4af5f4e84888674eae1951af2bc
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1462784
milestone62.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 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));