summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
authoradeshkp <adeshkp@users.noreply.github.com>2019-01-12 06:20:31 -0500
committeradeshkp <adeshkp@users.noreply.github.com>2019-01-12 06:20:31 -0500
commit5335681cd2ab05ad47e81be7722c9eee19d54065 (patch)
treeeced0f22032c4f01229ac0a18b9ffb6219cea309 /layout/base
parentf38edc94a31de3bae839cf63ed57c3851908ac46 (diff)
downloadUXP-5335681cd2ab05ad47e81be7722c9eee19d54065.tar
UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.tar.gz
UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.tar.lz
UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.tar.xz
UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.zip
Telemetry: Remove stubs and related code
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/nsDisplayList.cpp99
-rw-r--r--layout/base/nsDisplayList.h39
-rw-r--r--layout/base/nsLayoutUtils.cpp3
-rw-r--r--layout/base/nsPresShell.cpp4
-rw-r--r--layout/base/nsRefreshDriver.cpp38
5 files changed, 0 insertions, 183 deletions
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp
index 2bf20144a..2b9ad7ff8 100644
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -61,7 +61,6 @@
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/PendingAnimationTracker.h"
#include "mozilla/Preferences.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/Unused.h"
#include "mozilla/gfx/gfxVars.h"
@@ -1857,7 +1856,6 @@ already_AddRefed<LayerManager> nsDisplayList::PaintRoot(nsDisplayListBuilder* aB
RefPtr<ContainerLayer> root;
{
- PaintTelemetry::AutoRecord record(PaintTelemetry::Metric::Layerization);
root = layerBuilder->
BuildContainerLayerFor(aBuilder, layerManager, frame, nullptr, this,
containerParameters, nullptr);
@@ -7453,100 +7451,3 @@ nsDisplayFilter::PrintEffects(nsACString& aTo)
aTo += ")";
}
#endif
-
-namespace mozilla {
-
-uint32_t PaintTelemetry::sPaintLevel = 0;
-uint32_t PaintTelemetry::sMetricLevel = 0;
-EnumeratedArray<PaintTelemetry::Metric,
- PaintTelemetry::Metric::COUNT,
- double> PaintTelemetry::sMetrics;
-
-PaintTelemetry::AutoRecordPaint::AutoRecordPaint()
-{
- // Don't record nested paints.
- if (sPaintLevel++ > 0) {
- return;
- }
-
- // Reset metrics for a new paint.
- for (auto& metric : sMetrics) {
- metric = 0.0;
- }
- mStart = TimeStamp::Now();
-}
-
-PaintTelemetry::AutoRecordPaint::~AutoRecordPaint()
-{
- MOZ_ASSERT(sPaintLevel != 0);
- if (--sPaintLevel > 0) {
- return;
- }
-
- // If we're in multi-process mode, don't include paint times for the parent
- // process.
- if (gfxVars::BrowserTabsRemoteAutostart() && XRE_IsParentProcess()) {
- return;
- }
-
- double totalMs = (TimeStamp::Now() - mStart).ToMilliseconds();
-
- // If the total time was >= 16ms, then it's likely we missed a frame due to
- // painting. In this case we'll gather some detailed metrics below.
- if (totalMs <= 16.0) {
- return;
- }
-
- auto record = [=](const char* aKey, double aDurationMs) -> void {
- MOZ_ASSERT(aDurationMs <= totalMs);
-
- uint32_t amount = static_cast<int32_t>((aDurationMs / totalMs) * 100.0);
- };
-
- double dlMs = sMetrics[Metric::DisplayList];
- double flbMs = sMetrics[Metric::Layerization];
- double rMs = sMetrics[Metric::Rasterization];
-
- // Record all permutations since aggregation makes it difficult to
- // correlate. For example we can't derive "flb+r" from "dl" because we
- // don't know the total time associated with a bucket entry. So we just
- // play it safe and include everything. We can however derive "other" time
- // from the final permutation.
- record("dl", dlMs);
- record("flb", flbMs);
- record("r", rMs);
- record("dl,flb", dlMs + flbMs);
- record("dl,r", dlMs + rMs);
- record("flb,r", flbMs + rMs);
- record("dl,flb,r", dlMs + flbMs + rMs);
-}
-
-PaintTelemetry::AutoRecord::AutoRecord(Metric aMetric)
- : mMetric(aMetric)
-{
- // Don't double-record anything nested.
- if (sMetricLevel++ > 0) {
- return;
- }
-
- // Don't record inside nested paints, or outside of paints.
- if (sPaintLevel != 1) {
- return;
- }
-
- mStart = TimeStamp::Now();
-}
-
-PaintTelemetry::AutoRecord::~AutoRecord()
-{
- MOZ_ASSERT(sMetricLevel != 0);
-
- sMetricLevel--;
- if (mStart.IsNull()) {
- return;
- }
-
- sMetrics[mMetric] += (TimeStamp::Now() - mStart).ToMilliseconds();
-}
-
-} // namespace mozilla
diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h
index df584b489..9603a95b8 100644
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -4508,43 +4508,4 @@ public:
mutable mozilla::Maybe<bool> mIsFrameSelected;
};
-namespace mozilla {
-
-class PaintTelemetry
-{
- public:
- enum class Metric {
- DisplayList,
- Layerization,
- Rasterization,
- COUNT,
- };
-
- class AutoRecord
- {
- public:
- explicit AutoRecord(Metric aMetric);
- ~AutoRecord();
- private:
- Metric mMetric;
- mozilla::TimeStamp mStart;
- };
-
- class AutoRecordPaint
- {
- public:
- AutoRecordPaint();
- ~AutoRecordPaint();
- private:
- mozilla::TimeStamp mStart;
- };
-
- private:
- static uint32_t sPaintLevel;
- static uint32_t sMetricLevel;
- static mozilla::EnumeratedArray<Metric, Metric::COUNT, double> sMetrics;
-};
-
-} // namespace mozilla
-
#endif /*NSDISPLAYLIST_H_*/
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index c1f4ad372..19200d5a7 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -111,7 +111,6 @@
#include "FrameLayerBuilder.h"
#include "mozilla/layers/APZCTreeManager.h"
#include "mozilla/layers/CompositorBridgeChild.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/RuleNodeCacheConditions.h"
@@ -3534,8 +3533,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
PROFILER_LABEL("nsLayoutUtils", "PaintFrame::BuildDisplayList",
js::ProfileEntry::Category::GRAPHICS);
-
- PaintTelemetry::AutoRecord record(PaintTelemetry::Metric::DisplayList);
aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
}
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index 340042b46..969ebc962 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -170,7 +170,6 @@
#include "mozilla/css/ImageLoader.h"
#include "mozilla/dom/DocumentTimeline.h"
#include "mozilla/Preferences.h"
-#include "mozilla/Telemetry.h"
#include "nsCanvasFrame.h"
#include "nsIImageLoadingContent.h"
#include "nsImageFrame.h"
@@ -9394,9 +9393,6 @@ PresShell::DoVerifyReflow()
}
#endif
-// used with Telemetry metrics
-#define NS_LONG_REFLOW_TIME_MS 5000
-
bool
PresShell::ProcessReflowCommands(bool aInterruptible)
{
diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp
index b975a69dd..5ea7a0188 100644
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -55,7 +55,6 @@
#include "nsDocShell.h"
#include "nsISimpleEnumerator.h"
#include "nsJSEnvironment.h"
-#include "mozilla/Telemetry.h"
#include "gfxPrefs.h"
#include "BackgroundChild.h"
#include "mozilla/ipc/PBackgroundChild.h"
@@ -524,46 +523,10 @@ private:
private:
~RefreshDriverVsyncObserver() = default;
- void RecordTelemetryProbes(TimeStamp aVsyncTimestamp)
- {
- MOZ_ASSERT(NS_IsMainThread());
- #ifndef ANDROID /* bug 1142079 */
- if (XRE_IsParentProcess()) {
- TimeDuration vsyncLatency = TimeStamp::Now() - aVsyncTimestamp;
- uint32_t sample = (uint32_t)vsyncLatency.ToMilliseconds();
- RecordJank(sample);
- } else if (mVsyncRate != TimeDuration::Forever()) {
- TimeDuration contentDelay = (TimeStamp::Now() - mLastChildTick) - mVsyncRate;
- if (contentDelay.ToMilliseconds() < 0 ){
- // Vsyncs are noisy and some can come at a rate quicker than
- // the reported hardware rate. In those cases, consider that we have 0 delay.
- contentDelay = TimeDuration::FromMilliseconds(0);
- }
- uint32_t sample = (uint32_t)contentDelay.ToMilliseconds();
- RecordJank(sample);
- } else {
- // Request the vsync rate from the parent process. Might be a few vsyncs
- // until the parent responds.
- mVsyncRate = mVsyncRefreshDriverTimer->mVsyncChild->GetVsyncRate();
- }
- #endif
- }
-
- void RecordJank(uint32_t aJankMS)
- {
- uint32_t duration = 1 /* ms */;
- for (size_t i = 0;
- i < mozilla::ArrayLength(sJankLevels) && duration < aJankMS;
- ++i, duration *= 2) {
- sJankLevels[i]++;
- }
- }
-
void TickRefreshDriver(TimeStamp aVsyncTimestamp)
{
MOZ_ASSERT(NS_IsMainThread());
- RecordTelemetryProbes(aVsyncTimestamp);
if (XRE_IsParentProcess()) {
MonitorAutoLock lock(mRefreshTickLock);
aVsyncTimestamp = mRecentVsync;
@@ -2006,7 +1969,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
mViewManagerFlushIsPending = false;
RefPtr<nsViewManager> vm = mPresContext->GetPresShell()->GetViewManager();
{
- PaintTelemetry::AutoRecordPaint record;
vm->ProcessPendingUpdates();
}