diff options
Diffstat (limited to 'layout')
-rw-r--r-- | layout/base/nsDisplayList.cpp | 99 | ||||
-rw-r--r-- | layout/base/nsDisplayList.h | 39 | ||||
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 3 | ||||
-rw-r--r-- | layout/base/nsPresShell.cpp | 4 | ||||
-rw-r--r-- | layout/base/nsRefreshDriver.cpp | 38 | ||||
-rw-r--r-- | layout/build/nsLayoutCID.h | 3 | ||||
-rw-r--r-- | layout/build/nsLayoutModule.cpp | 6 | ||||
-rw-r--r-- | layout/style/ImageLoader.cpp | 3 |
8 files changed, 0 insertions, 195 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(); } diff --git a/layout/build/nsLayoutCID.h b/layout/build/nsLayoutCID.h index 47a90d7d8..1b43c7592 100644 --- a/layout/build/nsLayoutCID.h +++ b/layout/build/nsLayoutCID.h @@ -82,7 +82,4 @@ #define SERVICEWORKERMANAGER_CID \ { 0xc74bde32, 0xbcc7, 0x4840, { 0x84, 0x30, 0xc7, 0x33, 0x35, 0x1b, 0x21, 0x2a } } -#define NOTIFICATIONTELEMETRYSERVICE_CID \ -{ 0x5995b782, 0x6a0e, 0x4066, { 0xaa, 0xc5, 0x27, 0x6f, 0x0a, 0x9a, 0xd8, 0xcf } } - #endif /* nsLayoutCID_h__ */ diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp index 748bc11d8..8bb70f85c 100644 --- a/layout/build/nsLayoutModule.cpp +++ b/layout/build/nsLayoutModule.cpp @@ -204,7 +204,6 @@ using mozilla::dom::UDPSocketChild; using mozilla::dom::time::TimeService; using mozilla::net::StreamingProtocolControllerService; using mozilla::gmp::GeckoMediaPluginService; -using mozilla::dom::NotificationTelemetryService; #define NS_EDITORCOMMANDTABLE_CID \ { 0x4f5e62b8, 0xd659, 0x4156, \ @@ -292,7 +291,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(TextInputProcessor) NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPresentationService, NS_CreatePresentationService) NS_GENERIC_FACTORY_CONSTRUCTOR(PresentationTCPSessionTransport) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(NotificationTelemetryService, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(PushNotifier) //----------------------------------------------------------------------------- @@ -657,7 +655,6 @@ NS_DEFINE_NAMED_CID(NS_TEXTEDITOR_CID); NS_DEFINE_NAMED_CID(DOMREQUEST_SERVICE_CID); NS_DEFINE_NAMED_CID(QUOTAMANAGER_SERVICE_CID); NS_DEFINE_NAMED_CID(SERVICEWORKERMANAGER_CID); -NS_DEFINE_NAMED_CID(NOTIFICATIONTELEMETRYSERVICE_CID); NS_DEFINE_NAMED_CID(PUSHNOTIFIER_CID); NS_DEFINE_NAMED_CID(WORKERDEBUGGERMANAGER_CID); @@ -925,7 +922,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = { { &kDOMREQUEST_SERVICE_CID, false, nullptr, DOMRequestServiceConstructor }, { &kQUOTAMANAGER_SERVICE_CID, false, nullptr, QuotaManagerServiceConstructor }, { &kSERVICEWORKERMANAGER_CID, false, nullptr, ServiceWorkerManagerConstructor }, - { &kNOTIFICATIONTELEMETRYSERVICE_CID, false, nullptr, NotificationTelemetryServiceConstructor }, { &kPUSHNOTIFIER_CID, false, nullptr, PushNotifierConstructor }, { &kWORKERDEBUGGERMANAGER_CID, true, nullptr, WorkerDebuggerManagerConstructor }, { &kNS_AUDIOCHANNELAGENT_CID, true, nullptr, AudioChannelAgentConstructor }, @@ -1057,7 +1053,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = { { DOMREQUEST_SERVICE_CONTRACTID, &kDOMREQUEST_SERVICE_CID }, { QUOTAMANAGER_SERVICE_CONTRACTID, &kQUOTAMANAGER_SERVICE_CID }, { SERVICEWORKERMANAGER_CONTRACTID, &kSERVICEWORKERMANAGER_CID }, - { NOTIFICATIONTELEMETRYSERVICE_CONTRACTID, &kNOTIFICATIONTELEMETRYSERVICE_CID }, { PUSHNOTIFIER_CONTRACTID, &kPUSHNOTIFIER_CID }, { WORKERDEBUGGERMANAGER_CONTRACTID, &kWORKERDEBUGGERMANAGER_CID }, { NS_AUDIOCHANNELAGENT_CONTRACTID, &kNS_AUDIOCHANNELAGENT_CID }, @@ -1132,7 +1127,6 @@ static const mozilla::Module::CategoryEntry kLayoutCategories[] = { CONTENTDLF_CATEGORIES { "profile-after-change", "PresentationDeviceManager", PRESENTATION_DEVICE_MANAGER_CONTRACTID }, { "profile-after-change", "PresentationService", PRESENTATION_SERVICE_CONTRACTID }, - { "profile-after-change", "Notification Telemetry Service", NOTIFICATIONTELEMETRYSERVICE_CONTRACTID }, { nullptr } }; diff --git a/layout/style/ImageLoader.cpp b/layout/style/ImageLoader.cpp index 0a605abc9..a26a1741a 100644 --- a/layout/style/ImageLoader.cpp +++ b/layout/style/ImageLoader.cpp @@ -519,9 +519,6 @@ ImageLoader::FlushUseCounters() nsCOMPtr<imgIContainer> container; request->GetImage(getter_AddRefs(container)); - if (container) { - static_cast<image::Image*>(container.get())->ReportUseCounters(); - } } } |