[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] 134/311: Bug 1752861 - [profiler] Rename and expose to JS some existing frame labels as well as adding a few r=mstange, a=dmeehan



This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch geckoview-99.0.1-11.0-1
in repository tor-browser.

commit effe1c4bd21d4d14e5477544128b1fabaf52c4a3
Author: Julien Wajsberg <felash@xxxxxxxxx>
AuthorDate: Fri Mar 11 09:18:30 2022 +0000

    Bug 1752861 - [profiler] Rename and expose to JS some existing frame labels as well as adding a few r=mstange, a=dmeehan
    
    Differential Revision: https://phabricator.services.mozilla.com/D140389
---
 image/Decoder.cpp               | 2 +-
 layout/base/PresShell.cpp       | 4 ++--
 layout/base/RestyleManager.cpp  | 1 +
 layout/base/nsRefreshDriver.cpp | 4 +++-
 layout/style/Loader.cpp         | 2 +-
 layout/style/ServoStyleSet.cpp  | 1 +
 6 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/image/Decoder.cpp b/image/Decoder.cpp
index 5706c7b5f6648..595f5dfcf542d 100644
--- a/image/Decoder.cpp
+++ b/image/Decoder.cpp
@@ -171,7 +171,7 @@ LexerResult Decoder::Decode(IResumable* aOnResume /* = nullptr */) {
 
   LexerResult lexerResult(TerminalState::FAILURE);
   {
-    AUTO_PROFILER_LABEL_CATEGORY_PAIR(GRAPHICS_ImageDecoding);
+    AUTO_PROFILER_LABEL_CATEGORY_PAIR_RELEVANT_FOR_JS(GRAPHICS_ImageDecoding);
     AutoRecordDecoderTelemetry telemetry(this);
 
     lexerResult = DoDecode(*mIterator, aOnResume);
diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
index 80f75cc6c7ae8..22fe67b70424b 100644
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -6257,7 +6257,7 @@ void PresShell::PaintInternal(nsView* aViewToPaint, PaintInternalFlags aFlags) {
     uri = contentRoot->GetDocumentURI();
   }
   url = uri ? uri->GetSpecOrDefault() : "N/A"_ns;
-  AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("PresShell::Paint", GRAPHICS, url);
+  AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING_RELEVANT_FOR_JS("Paint", GRAPHICS, url);
 
   Maybe<js::AutoAssertNoContentJS> nojs;
 
@@ -9417,7 +9417,7 @@ bool PresShell::ScheduleReflowOffTimer() {
 bool PresShell::DoReflow(nsIFrame* target, bool aInterruptible,
                          OverflowChangedTracker* aOverflowTracker) {
   [[maybe_unused]] nsIURI* uri = mDocument->GetDocumentURI();
-  AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING(
+  AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING_RELEVANT_FOR_JS(
       "Reflow", LAYOUT_Reflow, uri ? uri->GetSpecOrDefault() : "N/A"_ns);
 
   LAYOUT_TELEMETRY_RECORD_BASE(Reflow);
diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp
index 1be66ec42b335..a4c74d9d8efe7 100644
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -3171,6 +3171,7 @@ static void VerifyFlatTree(const nsIContent& aContent) {
 #endif
 
 void RestyleManager::ProcessPendingRestyles() {
+  AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("Styles", LAYOUT);
 #ifdef DEBUG
   if (auto* root = mPresContext->Document()->GetRootElement()) {
     VerifyFlatTree(*root);
diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp
index 0e8e3183cb202..6a090969c4887 100644
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1982,6 +1982,8 @@ void nsRefreshDriver::RunFullscreenSteps() {
 }
 
 void nsRefreshDriver::UpdateIntersectionObservations(TimeStamp aNowTime) {
+  AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("Compute intersections", LAYOUT);
+
   AutoTArray<RefPtr<Document>, 32> documents;
 
   if (mPresContext->Document()->HasIntersectionObservers()) {
@@ -2268,7 +2270,7 @@ void nsRefreshDriver::Tick(VsyncId aId, TimeStamp aNowTime,
     UpdateThrottledState();
   }
 
-  AUTO_PROFILER_LABEL("nsRefreshDriver::Tick", LAYOUT);
+  AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("RefreshDriver tick", LAYOUT);
 
   nsAutoCString profilerStr;
   if (profiler_thread_is_being_profiled_for_markers()) {
diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp
index ca31d0d9c43c3..f7a8296b6a90e 100644
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -1542,7 +1542,7 @@ Loader::Completed Loader::ParseSheet(const nsACString& aBytes,
   if (aLoadData.mURI) {
     LOG_URI("  Load succeeded for URI: '%s', parsing", aLoadData.mURI);
   }
-  AUTO_PROFILER_LABEL("css::Loader::ParseSheet", LAYOUT_CSSParsing);
+  AUTO_PROFILER_LABEL_CATEGORY_PAIR_RELEVANT_FOR_JS(LAYOUT_CSSParsing);
 
   ++mParsedSheetCount;
 
diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp
index c6314972fd9ad..28e8ab8d844df 100644
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -1214,6 +1214,7 @@ already_AddRefed<ComputedStyle> ServoStyleSet::ResolveForDeclarations(
 }
 
 void ServoStyleSet::UpdateStylist() {
+  AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("Update stylesheet information", LAYOUT);
   MOZ_ASSERT(StylistNeedsUpdate());
 
   if (mStylistState & StylistState::StyleSheetsDirty) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits