From dc077244244b97eb947672d446b4511be357eedd Mon Sep 17 00:00:00 2001 From: adeshkp Date: Sat, 12 Jan 2019 06:20:31 -0500 Subject: Telemetry: Remove stubs and related code --- gfx/ipc/GPUChild.cpp | 14 ----------- gfx/ipc/GPUChild.h | 2 -- gfx/ipc/PGPU.ipdl | 6 ----- gfx/layers/apz/src/AsyncPanZoomController.cpp | 23 +----------------- .../src/PotentialCheckerboardDurationTracker.cpp | 18 --------------- .../apz/src/PotentialCheckerboardDurationTracker.h | 2 -- gfx/layers/client/ClientLayerManager.cpp | 2 -- gfx/layers/ipc/CompositorBridgeParent.cpp | 2 -- gfx/src/DriverCrashGuard.cpp | 13 ----------- gfx/src/DriverCrashGuard.h | 12 ---------- gfx/thebes/DeviceManagerDx.cpp | 2 -- gfx/thebes/gfxFont.cpp | 3 --- gfx/thebes/gfxPlatform.cpp | 27 ---------------------- gfx/thebes/gfxPlatformFontList.cpp | 10 +------- gfx/thebes/gfxWindowsPlatform.cpp | 16 ------------- gfx/thebes/gfxWindowsPlatform.h | 2 -- 16 files changed, 2 insertions(+), 152 deletions(-) (limited to 'gfx') diff --git a/gfx/ipc/GPUChild.cpp b/gfx/ipc/GPUChild.cpp index bfe2d56f72..ba6053f43d 100644 --- a/gfx/ipc/GPUChild.cpp +++ b/gfx/ipc/GPUChild.cpp @@ -125,20 +125,6 @@ GPUChild::RecvNotifyUiObservers(const nsCString& aTopic) return true; } -bool -GPUChild::RecvAccumulateChildHistogram(InfallibleTArray&& aAccumulations) -{ - /* Telemetry STUB */ - return true; -} - -bool -GPUChild::RecvAccumulateChildKeyedHistogram(InfallibleTArray&& aAccumulations) -{ - /* Telemetry STUB */ - return true; -} - bool GPUChild::RecvNotifyDeviceReset() { diff --git a/gfx/ipc/GPUChild.h b/gfx/ipc/GPUChild.h index 888884ddfc..fdb3931f73 100644 --- a/gfx/ipc/GPUChild.h +++ b/gfx/ipc/GPUChild.h @@ -34,8 +34,6 @@ public: // PGPUChild overrides. bool RecvInitComplete(const GPUDeviceData& aData) override; bool RecvReportCheckerboard(const uint32_t& aSeverity, const nsCString& aLog) override; - bool RecvAccumulateChildHistogram(InfallibleTArray&& aAccumulations) override; - bool RecvAccumulateChildKeyedHistogram(InfallibleTArray&& aAccumulations) override; void ActorDestroy(ActorDestroyReason aWhy) override; bool RecvGraphicsError(const nsCString& aError) override; bool RecvNotifyUiObservers(const nsCString& aTopic) override; diff --git a/gfx/ipc/PGPU.ipdl b/gfx/ipc/PGPU.ipdl index a2c035c751..db3f6e5037 100644 --- a/gfx/ipc/PGPU.ipdl +++ b/gfx/ipc/PGPU.ipdl @@ -13,8 +13,6 @@ using base::ProcessId from "base/process.h"; using mozilla::TimeDuration from "mozilla/TimeStamp.h"; using mozilla::CSSToLayoutDeviceScale from "Units.h"; using mozilla::gfx::IntSize from "mozilla/gfx/2D.h"; -using mozilla::Telemetry::Accumulation from "mozilla/TelemetryComms.h"; -using mozilla::Telemetry::KeyedAccumulation from "mozilla/TelemetryComms.h"; namespace mozilla { namespace gfx { @@ -90,10 +88,6 @@ child: // observer service. async NotifyUiObservers(nsCString aTopic); - // Messages for reporting telemetry to the UI process. - async AccumulateChildHistogram(Accumulation[] accumulations); - async AccumulateChildKeyedHistogram(KeyedAccumulation[] accumulations); - async NotifyDeviceReset(); }; diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index e7574eeb7c..3d41123956 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -38,7 +38,6 @@ #include "mozilla/ReentrantMonitor.h" // for ReentrantMonitorAutoEnter, etc #include "mozilla/RefPtr.h" // for RefPtr #include "mozilla/StaticPtr.h" // for StaticAutoPtr -#include "mozilla/Telemetry.h" // for Telemetry #include "mozilla/TimeStamp.h" // for TimeDuration, TimeStamp #include "mozilla/dom/CheckerboardReportService.h" // for CheckerboardEventStorage // note: CheckerboardReportService.h actually lives in gfx/layers/apz/util/ @@ -1686,25 +1685,6 @@ void AsyncPanZoomController::DoDelayedRequestContentRepaint() mPinchPaintTimerSet = false; } -static ScrollInputMethod -ScrollInputMethodForWheelDeltaType(ScrollWheelInput::ScrollDeltaType aDeltaType) -{ - switch (aDeltaType) { - case ScrollWheelInput::SCROLLDELTA_LINE: { - return ScrollInputMethod::ApzWheelLine; - } - case ScrollWheelInput::SCROLLDELTA_PAGE: { - return ScrollInputMethod::ApzWheelPage; - } - case ScrollWheelInput::SCROLLDELTA_PIXEL: { - return ScrollInputMethod::ApzWheelPixel; - } - default: - MOZ_ASSERT_UNREACHABLE("unexpected scroll delta type"); - return ScrollInputMethod::ApzWheelLine; - } -} - nsEventStatus AsyncPanZoomController::OnScrollWheel(const ScrollWheelInput& aEvent) { ParentLayerPoint delta = GetScrollWheelDelta(aEvent); @@ -3229,11 +3209,10 @@ AsyncPanZoomController::ReportCheckerboard(const TimeStamp& aSampleTime) mLastCheckerboardReport = aSampleTime; bool recordTrace = gfxPrefs::APZRecordCheckerboarding(); - bool forTelemetry = Telemetry::CanRecordExtended(); uint32_t magnitude = GetCheckerboardMagnitude(); MutexAutoLock lock(mCheckerboardEventLock); - if (!mCheckerboardEvent && (recordTrace || forTelemetry)) { + if (!mCheckerboardEvent && recordTrace) { mCheckerboardEvent = MakeUnique(recordTrace); } mPotentialCheckerboardTracker.InTransform(IsTransformingState(mState)); diff --git a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp index e469421adf..3c62a11015 100644 --- a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp +++ b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp @@ -6,8 +6,6 @@ #include "PotentialCheckerboardDurationTracker.h" -#include "mozilla/Telemetry.h" // for Telemetry - namespace mozilla { namespace layers { @@ -20,10 +18,6 @@ PotentialCheckerboardDurationTracker::PotentialCheckerboardDurationTracker() void PotentialCheckerboardDurationTracker::CheckerboardSeen() { - // This might get called while mInCheckerboard is already true - if (!Tracking()) { - mCurrentPeriodStart = TimeStamp::Now(); - } mInCheckerboard = true; } @@ -32,9 +26,6 @@ PotentialCheckerboardDurationTracker::CheckerboardDone() { MOZ_ASSERT(Tracking()); mInCheckerboard = false; - if (!Tracking()) { - /* Telemetry STUB */ - } } void @@ -50,19 +41,10 @@ PotentialCheckerboardDurationTracker::InTransform(bool aInTransform) // must be true (or we would have early-exited this function already). // Therefore, we are starting a potential checkerboard period. mInTransform = aInTransform; - mCurrentPeriodStart = TimeStamp::Now(); return; } mInTransform = aInTransform; - - if (!Tracking()) { - // Tracking() must have been true at the start of this function, or we - // would have taken the other !Tracking branch above. If it's false now, - // it means we just stopped tracking, so we are ending a potential - // checkerboard period. - /* Telemetry STUB */ - } } bool diff --git a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.h b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.h index 6154003ad6..bcba113d34 100644 --- a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.h +++ b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.h @@ -50,8 +50,6 @@ private: private: bool mInCheckerboard; bool mInTransform; - - TimeStamp mCurrentPeriodStart; }; } // namespace layers diff --git a/gfx/layers/client/ClientLayerManager.cpp b/gfx/layers/client/ClientLayerManager.cpp index 074807e8c3..1e4369bcee 100644 --- a/gfx/layers/client/ClientLayerManager.cpp +++ b/gfx/layers/client/ClientLayerManager.cpp @@ -289,8 +289,6 @@ ClientLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback, void* aCallbackData, EndTransactionFlags) { - PaintTelemetry::AutoRecord record(PaintTelemetry::Metric::Rasterization); - PROFILER_LABEL("ClientLayerManager", "EndTransactionInternal", js::ProfileEntry::Category::GRAPHICS); diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 87a19f5c01..97ea984dba 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -51,7 +51,6 @@ #include "mozilla/layout/RenderFrameParent.h" #include "mozilla/media/MediaSystemResourceService.h" // for MediaSystemResourceService #include "mozilla/mozalloc.h" // for operator new, etc -#include "mozilla/Telemetry.h" #ifdef MOZ_WIDGET_GTK #include "basic/X11BasicCompositor.h" // for X11BasicCompositor #endif @@ -72,7 +71,6 @@ #include "mozilla/Hal.h" #include "mozilla/HalTypes.h" #include "mozilla/StaticPtr.h" -#include "mozilla/Telemetry.h" #include "mozilla/VsyncDispatcher.h" #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) #include "VsyncSource.h" diff --git a/gfx/src/DriverCrashGuard.cpp b/gfx/src/DriverCrashGuard.cpp index fd616575bd..2303e9d664 100644 --- a/gfx/src/DriverCrashGuard.cpp +++ b/gfx/src/DriverCrashGuard.cpp @@ -411,10 +411,6 @@ D3D11LayersCrashGuard::Initialize() } DriverCrashGuard::Initialize(); - - // If no telemetry states have been recorded, this will set the state to okay. - // Otherwise, it will have no effect. - RecordTelemetry(TelemetryState::Okay); } bool @@ -447,30 +443,21 @@ D3D11LayersCrashGuard::UpdateEnvironment() return false; } - RecordTelemetry(TelemetryState::EnvironmentChanged); return true; } void D3D11LayersCrashGuard::LogCrashRecovery() { - RecordTelemetry(TelemetryState::RecoveredFromCrash); gfxCriticalNote << "D3D11 layers just crashed; D3D11 will be disabled."; } void D3D11LayersCrashGuard::LogFeatureDisabled() { - RecordTelemetry(TelemetryState::FeatureDisabled); gfxCriticalNote << "D3D11 layers disabled due to a prior crash."; } -void -D3D11LayersCrashGuard::RecordTelemetry(TelemetryState aState) -{ - /* STUB */ -} - D3D9VideoCrashGuard::D3D9VideoCrashGuard(dom::ContentParent* aContentParent) : DriverCrashGuard(CrashGuardType::D3D9Video, aContentParent) { diff --git a/gfx/src/DriverCrashGuard.h b/gfx/src/DriverCrashGuard.h index 9a0c5851a2..8db9287c94 100644 --- a/gfx/src/DriverCrashGuard.h +++ b/gfx/src/DriverCrashGuard.h @@ -66,15 +66,6 @@ public: bool Crashed(); void NotifyCrashed(); - // These are the values reported to Telemetry (GRAPHICS_DRIVER_STARTUP_TEST). - // Values should not change; add new values to the end. - enum class TelemetryState { - Okay = 0, - EnvironmentChanged = 1, - RecoveredFromCrash = 2, - FeatureDisabled = 3 - }; - enum class Mode { // Normal operation. Normal, @@ -136,9 +127,6 @@ class D3D11LayersCrashGuard final : public DriverCrashGuard bool UpdateEnvironment() override; void LogCrashRecovery() override; void LogFeatureDisabled() override; - - private: - void RecordTelemetry(TelemetryState aState); }; class D3D9VideoCrashGuard final : public DriverCrashGuard diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp index e1cfc5763f..9f42974c33 100644 --- a/gfx/thebes/DeviceManagerDx.cpp +++ b/gfx/thebes/DeviceManagerDx.cpp @@ -455,13 +455,11 @@ DeviceManagerDx::CreateContentDevice() : D3D_DRIVER_TYPE_UNKNOWN; if (!CreateDevice(adapter, type, flags, hr, device)) { gfxCriticalNote << "Recovered from crash while creating a D3D11 content device"; - gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode::Content); return FeatureStatus::CrashedInHandler; } if (FAILED(hr) || !device) { gfxCriticalNote << "Failed to create a D3D11 content device: " << hexa(hr); - gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode::Content); return FeatureStatus::Failed; } diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index 8ccd721f84..490a866dbf 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -36,7 +36,6 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/Preferences.h" #include "mozilla/Services.h" -#include "mozilla/Telemetry.h" #include "gfxMathTable.h" #include "gfxSVGGlyphs.h" #include "gfx2DGlue.h" @@ -2573,8 +2572,6 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget, } gfxShapedWord* sw = entry->mShapedWord.get(); - bool isContent = !mStyle.systemFont; - if (sw) { sw->ResetAge(); #ifndef RELEASE_OR_BETA diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 70ba2fe6ab..50d1fcb465 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -11,7 +11,6 @@ #include "mozilla/gfx/GPUProcessManager.h" #include "mozilla/gfx/GraphicsMessages.h" #include "mozilla/ClearOnShutdown.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "mozilla/Unused.h" @@ -349,25 +348,6 @@ void CrashStatsLogForwarder::Log(const std::string& aString) } } -class CrashTelemetryEvent : public Runnable -{ - virtual ~CrashTelemetryEvent() {} - - NS_DECL_ISUPPORTS_INHERITED - - explicit CrashTelemetryEvent(uint32_t aReason) : mReason(aReason) {} - - NS_IMETHOD Run() override { - MOZ_ASSERT(NS_IsMainThread()); - return NS_OK; - } - -protected: - uint32_t mReason; -}; - -NS_IMPL_ISUPPORTS_INHERITED0(CrashTelemetryEvent, Runnable); - void CrashStatsLogForwarder::CrashAction(LogReason aReason) { @@ -2435,13 +2415,6 @@ gfxPlatform::NotifyCompositorCreated(LayersBackend aBackend) // Set the backend before we notify so it's available immediately. mCompositorBackend = aBackend; - - // Notify that we created a compositor, so telemetry can update. - NS_DispatchToMainThread(NS_NewRunnableFunction([] { - if (nsCOMPtr obsvc = services::GetObserverService()) { - obsvc->NotifyObservers(nullptr, "compositor:created", nullptr); - } - })); } void diff --git a/gfx/thebes/gfxPlatformFontList.cpp b/gfx/thebes/gfxPlatformFontList.cpp index 59df406663..5f7bbb832f 100644 --- a/gfx/thebes/gfxPlatformFontList.cpp +++ b/gfx/thebes/gfxPlatformFontList.cpp @@ -21,7 +21,6 @@ #include "mozilla/Likely.h" #include "mozilla/MemoryReporting.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "mozilla/gfx/2D.h" @@ -322,7 +321,6 @@ gfxPlatformFontList::InitOtherFamilyNames() mOtherFamilyNamesInitialized = true; } TimeStamp end = TimeStamp::Now(); - if (LOG_FONTINIT_ENABLED()) { TimeDuration elapsed = end - start; LOG_FONTINIT(("(fontinit) InitOtherFamilyNames took %8.2f ms %s", @@ -470,7 +468,7 @@ gfxPlatformFontList::GetFontList(nsIAtom *aLangGroup, { for (auto iter = mFontFamilies.Iter(); !iter.Done(); iter.Next()) { RefPtr& family = iter.Data(); - // use the first variation for now. This data should be the same + // use the first variation for now. This data should be the same // for all the variations and should probably be moved up to // the Family gfxFontStyle style; @@ -578,12 +576,6 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh, } else if (aCh == 0xFFFD && fontEntry && fallbackFamily) { mReplacementCharFallbackFamily = fallbackFamily; } - - // track system fallback time - static bool first = true; - int32_t intElapsed = int32_t(first ? elapsed.ToMilliseconds() : - elapsed.ToMicroseconds()); - first = false; return fontEntry; } diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index b1ede7ad27..82e36efe28 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -22,7 +22,6 @@ #include "nsIGfxInfo.h" #include "nsServiceManagerUtils.h" #include "nsTArray.h" -#include "mozilla/Telemetry.h" #include "GeckoProfiler.h" #include "nsIWindowsRegKey.h" @@ -1435,12 +1434,6 @@ gfxWindowsPlatform::InitializeD3D11Config() } } -/* static */ void -gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode aDevice) -{ - /* STUB */ -} - void gfxWindowsPlatform::InitializeDevices() { @@ -1478,18 +1471,9 @@ gfxWindowsPlatform::InitializeDevices() return; } - bool shouldUseD2D = gfxConfig::IsEnabled(Feature::DIRECT2D); - // First, initialize D3D11. If this succeeds we attempt to use Direct2D. InitializeD3D11(); InitializeD2D(); - - if (!gfxConfig::IsEnabled(Feature::DIRECT2D) && - XRE_IsContentProcess() && - shouldUseD2D) - { - RecordContentDeviceFailure(TelemetryDeviceCode::D2D1); - } } void diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h index f401038fcb..129365f820 100644 --- a/gfx/thebes/gfxWindowsPlatform.h +++ b/gfx/thebes/gfxWindowsPlatform.h @@ -225,8 +225,6 @@ public: } bool SupportsPluginDirectDXGIDrawing(); - static void RecordContentDeviceFailure(mozilla::gfx::TelemetryDeviceCode aDevice); - protected: bool AccelerateLayersByDefault() override { return true; -- cgit v1.2.3