Backed out changeset 5281f57107c7 (
bug 1728423) for hangs in nsLayoutUtils::PaintFrame (
bug 1729723). CLOSED TREE
deleted file mode 100644
--- a/gfx/metrics.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# This file defines the metrics that are recorded by the Glean SDK. They are
-# automatically converted to platform-specific code at build time using the
-# `glean_parser` PyPI package.
-
----
-$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
-
-paint:
- build_displaylist_time:
- type: timing_distribution
- description: >
- The time to build a Gecko display list.
- bugs:
- - https://bugzilla.mozilla.org/show_bug.cgi?id=1728423
- data_reviews:
- - https://bugzilla.mozilla.org/show_bug.cgi?id=1728423
- data_sensitivity:
- - technical
- notification_emails:
- - gfx-telemetry-alerts@mozilla.com
- - mwoodrow@mozilla.com
- expires: never
- telemetry_mirror: PAINT_BUILD_DISPLAYLIST_TIME
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -29,17 +29,16 @@
#include "LayoutLogging.h"
#include "MobileViewportManager.h"
#include "mozilla/AccessibleCaretEventHub.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/BasicEvents.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/DisplayPortUtils.h"
#include "mozilla/GeckoBindings.h"
-#include "mozilla/glean/GleanMetrics.h"
#include "mozilla/dom/AnonymousContent.h"
#include "mozilla/dom/BrowserChild.h"
#include "mozilla/dom/CanvasUtils.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/DocumentInlines.h"
#include "mozilla/dom/DOMRect.h"
#include "mozilla/dom/DOMStringList.h"
#include "mozilla/dom/Element.h"
@@ -3093,17 +3092,16 @@ void nsLayoutUtils::PaintFrame(gfxContex
NS_ASSERTION(aRenderingContext, "need a rendering context");
}
}
nsPresContext* presContext = aFrame->PresContext();
PresShell* presShell = presContext->PresShell();
TimeStamp startBuildDisplayList = TimeStamp::Now();
- auto dlTimerId = mozilla::glean::paint::build_displaylist_time.Start();
const bool buildCaret = !(aFlags & PaintFrameFlags::HideCaret);
// Note that isForPainting here does not include the PaintForPrinting builder
// mode; that's OK because there is no point in using retained display lists
// for a print destination.
const bool isForPainting = (aFlags & PaintFrameFlags::WidgetLayers) &&
aBuilderMode == nsDisplayListBuilderMode::Painting;
@@ -3381,18 +3379,19 @@ void nsLayoutUtils::PaintFrame(gfxContex
builder->IncrementPresShellPaintCount(presShell);
}
MOZ_ASSERT(updateState != PartialUpdateResult::Failed);
builder->Check();
const double geckoDLBuildTime =
(TimeStamp::Now() - startBuildDisplayList).ToMilliseconds();
- mozilla::glean::paint::build_displaylist_time.StopAndAccumulate(
- std::move(dlTimerId));
+
+ Telemetry::Accumulate(Telemetry::PAINT_BUILD_DISPLAYLIST_TIME,
+ geckoDLBuildTime);
bool consoleNeedsDisplayList =
(gfxUtils::DumpDisplayList() || gfxEnv::DumpPaint()) &&
builder->IsInActiveDocShell();
#ifdef MOZ_DUMP_PAINTING
FILE* savedDumpFile = gfxUtils::sDumpPaintFile;
#endif
--- a/toolkit/components/glean/metrics_index.py
+++ b/toolkit/components/glean/metrics_index.py
@@ -6,17 +6,16 @@
# The list of all Glean metrics.yaml files, relative to the top src dir.
# New additions should be added to the bottom of the list.
metrics_yamls = [
"toolkit/components/glean/metrics.yaml",
"toolkit/components/glean/tests/test_metrics.yaml",
"toolkit/mozapps/update/metrics.yaml",
"browser/base/content/metrics.yaml",
- "gfx/metrics.yaml",
]
# The list of all Glean pings.yaml files, relative to the top src dir.
# New additions should be added to the bottom of the list.
pings_yamls = [
"toolkit/components/glean/pings.yaml",
"toolkit/components/glean/tests/test_pings.yaml",
"toolkit/mozapps/update/pings.yaml",