Commit 830ac30e authored by Julien Wajsberg's avatar Julien Wajsberg
Browse files

Bug 1752861 - [profiler] Rename and expose to JS some existing frame labels as...

Bug 1752861 - [profiler] Rename and expose to JS some existing frame labels as well as adding a few r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D140389
parent 94fa5619
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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);
+3 −1
Original line number Diff line number Diff line
@@ -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()) {
+1 −1
Original line number Diff line number Diff line
@@ -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;

Loading