diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-03 10:11:38 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-03 10:11:38 +0200 |
commit | ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (patch) | |
tree | c44670a25d942a672951e430499f70978ec7d337 /gfx/thebes | |
parent | 45f9a0daad81d1c6a1188b3473e5f0c67d27c0aa (diff) | |
download | UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.gz UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.lz UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.xz UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.zip |
Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables).
Stub resolution/removal should be a follow-up to this.
Diffstat (limited to 'gfx/thebes')
-rw-r--r-- | gfx/thebes/DeviceManagerDx.cpp | 6 | ||||
-rw-r--r-- | gfx/thebes/gfxDWriteFontList.cpp | 12 | ||||
-rw-r--r-- | gfx/thebes/gfxFont.cpp | 7 | ||||
-rw-r--r-- | gfx/thebes/gfxGradientCache.cpp | 2 | ||||
-rw-r--r-- | gfx/thebes/gfxMacPlatformFontList.mm | 5 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatform.cpp | 25 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatformFontList.cpp | 12 | ||||
-rw-r--r-- | gfx/thebes/gfxUserFontSet.cpp | 14 | ||||
-rwxr-xr-x | gfx/thebes/gfxWindowsPlatform.cpp | 14 |
9 files changed, 2 insertions, 95 deletions
diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp index 2f2693c76..e1cfc5763 100644 --- a/gfx/thebes/DeviceManagerDx.cpp +++ b/gfx/thebes/DeviceManagerDx.cpp @@ -10,7 +10,6 @@ #include "gfxPrefs.h" #include "gfxWindowsPlatform.h" #include "mozilla/D3DMessageUtils.h" -#include "mozilla/Telemetry.h" #include "mozilla/WindowsVersion.h" #include "mozilla/gfx/GraphicsMessages.h" #include "mozilla/gfx/Logging.h" @@ -589,10 +588,6 @@ DeviceManagerDx::MaybeResetAndReacquireDevices() return false; } - if (resetReason != DeviceResetReason::FORCED_RESET) { - Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON, uint32_t(resetReason)); - } - bool createCompositorDevice = !!mCompositorDevice; bool createContentDevice = !!mContentDevice; @@ -724,7 +719,6 @@ DeviceManagerDx::GetAnyDeviceRemovedReason(DeviceResetReason* aOutReason) void DeviceManagerDx::ForceDeviceReset(ForcedDeviceResetReason aReason) { - Telemetry::Accumulate(Telemetry::FORCED_DEVICE_RESET_REASON, uint32_t(aReason)); { MutexAutoLock lock(mDeviceLock); mDeviceResetReason = Some(DeviceResetReason::FORCED_RESET); diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index d159fddb1..5cc1fbb92 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -14,7 +14,6 @@ #include "nsCharSeparatedTokenizer.h" #include "mozilla/Preferences.h" #include "mozilla/Sprintf.h" -#include "mozilla/Telemetry.h" #include "nsDirectoryServiceUtils.h" #include "nsDirectoryServiceDefs.h" #include "nsAppDirectoryServiceDefs.h" @@ -864,8 +863,6 @@ gfxDWriteFontList::InitFontListForPlatform() hr = gfxWindowsPlatform::GetPlatform()->GetDWriteFactory()-> GetGdiInterop(getter_AddRefs(mGDIInterop)); if (FAILED(hr)) { - Telemetry::Accumulate(Telemetry::DWRITEFONT_INIT_PROBLEM, - uint32_t(errGDIInterop)); return NS_ERROR_FAILURE; } @@ -878,8 +875,6 @@ gfxDWriteFontList::InitFontListForPlatform() NS_ASSERTION(SUCCEEDED(hr), "GetSystemFontCollection failed!"); if (FAILED(hr)) { - Telemetry::Accumulate(Telemetry::DWRITEFONT_INIT_PROBLEM, - uint32_t(errSystemFontCollection)); return NS_ERROR_FAILURE; } @@ -891,8 +886,6 @@ gfxDWriteFontList::InitFontListForPlatform() NS_ASSERTION(mFontFamilies.Count() != 0, "no fonts found in the system fontlist -- holy crap batman!"); if (mFontFamilies.Count() == 0) { - Telemetry::Accumulate(Telemetry::DWRITEFONT_INIT_PROBLEM, - uint32_t(errNoFonts)); return NS_ERROR_FAILURE; } @@ -1001,9 +994,6 @@ gfxDWriteFontList::InitFontListForPlatform() } elapsedTime = (t5.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart; - Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_TOTAL, elapsedTime); - Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_COUNT, - mSystemFonts->GetFontFamilyCount()); LOG_FONTINIT(( "(fontinit) Total time in InitFontList: %9.3f ms (families: %d, %s)\n", elapsedTime, mSystemFonts->GetFontFamilyCount(), @@ -1013,7 +1003,6 @@ gfxDWriteFontList::InitFontListForPlatform() LOG_FONTINIT(("(fontinit) --- base/interop obj initialization init: %9.3f ms\n", elapsedTime)); elapsedTime = (t3.QuadPart - t2.QuadPart) * 1000.0 / frequency.QuadPart; - Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_COLLECT, elapsedTime); LOG_FONTINIT(("(fontinit) --- GetSystemFontCollection: %9.3f ms\n", elapsedTime)); elapsedTime = (t4.QuadPart - t3.QuadPart) * 1000.0 / frequency.QuadPart; @@ -1455,7 +1444,6 @@ gfxDWriteFontList::PlatformGlobalFontFallback(const uint32_t aCh, *aMatchedFamily = family; return fontEntry; } - Telemetry::Accumulate(Telemetry::BAD_FALLBACK_FONT, true); } return nullptr; diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index d0b747fff..8ccd721f8 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -229,7 +229,6 @@ gfxFontCache::Lookup(const gfxFontEntry* aFontEntry, Key key(aFontEntry, aStyle, aUnicodeRangeMap); HashEntry *entry = mFonts.GetEntry(key); - Telemetry::Accumulate(Telemetry::FONT_CACHE_HIT, entry != nullptr); if (!entry) return nullptr; @@ -2578,9 +2577,6 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget, if (sw) { sw->ResetAge(); - Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_HITS_CONTENT : - Telemetry::WORD_CACHE_HITS_CHROME), - aLength); #ifndef RELEASE_OR_BETA if (aTextPerf) { aTextPerf->current.wordCacheHit++; @@ -2589,9 +2585,6 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget, return sw; } - Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_MISSES_CONTENT : - Telemetry::WORD_CACHE_MISSES_CHROME), - aLength); #ifndef RELEASE_OR_BETA if (aTextPerf) { aTextPerf->current.wordCacheMiss++; diff --git a/gfx/thebes/gfxGradientCache.cpp b/gfx/thebes/gfxGradientCache.cpp index fa25bd78c..bfa82685c 100644 --- a/gfx/thebes/gfxGradientCache.cpp +++ b/gfx/thebes/gfxGradientCache.cpp @@ -8,7 +8,6 @@ #include "PLDHashTable.h" #include "nsExpirationTracker.h" #include "nsClassHashtable.h" -#include "mozilla/Telemetry.h" #include "gfxGradientCache.h" #include <time.h> @@ -127,7 +126,6 @@ class GradientCache final : public nsExpirationTracker<GradientCacheData,4> { srand(time(nullptr)); mTimerPeriod = rand() % MAX_GENERATION_MS + 1; - Telemetry::Accumulate(Telemetry::GRADIENT_RETENTION_TIME, mTimerPeriod); } virtual void NotifyExpired(GradientCacheData* aObject) diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index bf958a90b..3d2fcc6a9 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -65,7 +65,6 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/Preferences.h" #include "mozilla/Sprintf.h" -#include "mozilla/Telemetry.h" #include "mozilla/gfx/2D.h" #include <unistd.h> @@ -1043,10 +1042,6 @@ gfxMacPlatformFontList::PlatformGlobalFontFallback(const uint32_t aCh, } } - if (cantUseFallbackFont) { - Telemetry::Accumulate(Telemetry::BAD_FALLBACK_FONT, cantUseFallbackFont); - } - ::CFRelease(str); return fontEntry; diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 171d1bec9..d5af16a19 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -361,7 +361,6 @@ class CrashTelemetryEvent : public Runnable NS_IMETHOD Run() override { MOZ_ASSERT(NS_IsMainThread()); - Telemetry::Accumulate(Telemetry::GFX_CRASH, mReason); return NS_OK; } @@ -374,29 +373,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(CrashTelemetryEvent, Runnable); void CrashStatsLogForwarder::CrashAction(LogReason aReason) { -#ifndef RELEASE_OR_BETA - // Non-release builds crash by default, but will use telemetry - // if this environment variable is present. - static bool useTelemetry = gfxEnv::GfxDevCrashTelemetry(); -#else - // Release builds use telemetry by default, but will crash instead - // if this environment variable is present. - static bool useTelemetry = !gfxEnv::GfxDevCrashMozCrash(); -#endif - - if (useTelemetry) { - // The callers need to assure that aReason is in the range - // that the telemetry call below supports. - if (NS_IsMainThread()) { - Telemetry::Accumulate(Telemetry::GFX_CRASH, (uint32_t)aReason); - } else { - nsCOMPtr<nsIRunnable> r1 = new CrashTelemetryEvent((uint32_t)aReason); - NS_DispatchToMainThread(r1); - } - } else { - // ignoring aReason, we can get the information we need from the stack - MOZ_CRASH("GFX_CRASH"); - } + MOZ_CRASH("GFX_CRASH"); } NS_IMPL_ISUPPORTS(SRGBOverrideObserver, nsIObserver, nsISupportsWeakReference) diff --git a/gfx/thebes/gfxPlatformFontList.cpp b/gfx/thebes/gfxPlatformFontList.cpp index e12f4e197..59df40666 100644 --- a/gfx/thebes/gfxPlatformFontList.cpp +++ b/gfx/thebes/gfxPlatformFontList.cpp @@ -322,8 +322,6 @@ gfxPlatformFontList::InitOtherFamilyNames() mOtherFamilyNamesInitialized = true; } TimeStamp end = TimeStamp::Now(); - Telemetry::AccumulateTimeDelta(Telemetry::FONTLIST_INITOTHERFAMILYNAMES, - start, end); if (LOG_FONTINIT_ENABLED()) { TimeDuration elapsed = end - start; @@ -370,8 +368,6 @@ gfxPlatformFontList::SearchFamiliesForFaceName(const nsAString& aFaceName) lookup = FindFaceName(aFaceName); TimeStamp end = TimeStamp::Now(); - Telemetry::AccumulateTimeDelta(Telemetry::FONTLIST_INITFACENAMELISTS, - start, end); if (LOG_FONTINIT_ENABLED()) { TimeDuration elapsed = end - start; LOG_FONTINIT(("(fontinit) SearchFamiliesForFaceName took %8.2f ms %s %s", @@ -587,16 +583,8 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh, static bool first = true; int32_t intElapsed = int32_t(first ? elapsed.ToMilliseconds() : elapsed.ToMicroseconds()); - Telemetry::Accumulate((first ? Telemetry::SYSTEM_FONT_FALLBACK_FIRST : - Telemetry::SYSTEM_FONT_FALLBACK), - intElapsed); first = false; - // track the script for which fallback occurred (incremented one make it - // 1-based) - Telemetry::Accumulate(Telemetry::SYSTEM_FONT_FALLBACK_SCRIPT, - int(aRunScript) + 1); - return fontEntry; } diff --git a/gfx/thebes/gfxUserFontSet.cpp b/gfx/thebes/gfxUserFontSet.cpp index 23c26d9fe..72c54d9b5 100644 --- a/gfx/thebes/gfxUserFontSet.cpp +++ b/gfx/thebes/gfxUserFontSet.cpp @@ -453,8 +453,6 @@ gfxUserFontEntry::LoadNextSrc() gfxUserFontData::kUnknownCompression); mPlatformFontEntry = fe; SetLoadState(STATUS_LOADED); - Telemetry::Accumulate(Telemetry::WEBFONT_SRCTYPE, - currSrc.mSourceType + 1); return; } else { LOG(("userfonts (%p) [src %d] failed local: (%s) for (%s)\n", @@ -517,8 +515,6 @@ gfxUserFontEntry::LoadNextSrc() if (NS_SUCCEEDED(rv) && LoadPlatformFont(buffer, bufferLength)) { SetLoadState(STATUS_LOADED); - Telemetry::Accumulate(Telemetry::WEBFONT_SRCTYPE, - currSrc.mSourceType + 1); return; } else { mFontSet->LogMessage(this, @@ -572,8 +568,6 @@ gfxUserFontEntry::LoadNextSrc() // LoadPlatformFont takes ownership of the buffer, so no need // to free it here. SetLoadState(STATUS_LOADED); - Telemetry::Accumulate(Telemetry::WEBFONT_SRCTYPE, - currSrc.mSourceType + 1); return; } else { mFontSet->LogMessage(this, @@ -617,7 +611,6 @@ gfxUserFontEntry::LoadPlatformFont(const uint8_t* aFontData, uint32_t& aLength) gfxUserFontType fontType = gfxFontUtils::DetermineFontDataType(aFontData, aLength); - Telemetry::Accumulate(Telemetry::WEBFONT_FONTTYPE, uint32_t(fontType)); // Unwrap/decompress/sanitize or otherwise munge the downloaded data // to make a usable sfnt structure. @@ -650,13 +643,6 @@ gfxUserFontEntry::LoadPlatformFont(const uint8_t* aFontData, uint32_t& aLength) if (saneData) { if (saneLen) { fontCompressionRatio = uint32_t(100.0 * aLength / saneLen + 0.5); - if (fontType == GFX_USERFONT_WOFF || - fontType == GFX_USERFONT_WOFF2) { - Telemetry::Accumulate(fontType == GFX_USERFONT_WOFF ? - Telemetry::WEBFONT_COMPRESSION_WOFF : - Telemetry::WEBFONT_COMPRESSION_WOFF2, - fontCompressionRatio); - } } // The sanitizer ensures that we have a valid sfnt and a usable diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index a988859eb..b1ede7ad2 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -430,10 +430,6 @@ gfxWindowsPlatform::HandleDeviceReset() return false; } - if (resetReason != DeviceResetReason::FORCED_RESET) { - Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON, uint32_t(resetReason)); - } - // Remove devices and adapters. DeviceManagerDx::Get()->ResetDevices(); @@ -1442,15 +1438,7 @@ gfxWindowsPlatform::InitializeD3D11Config() /* static */ void gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode aDevice) { - // If the parent process fails to acquire a device, we record this - // normally as part of the environment. The exceptional case we're - // looking for here is when the parent process successfully acquires - // a device, but the content process fails to acquire the same device. - // This would not normally be displayed in about:support. - if (!XRE_IsContentProcess()) { - return; - } - Telemetry::Accumulate(Telemetry::GFX_CONTENT_FAILED_TO_ACQUIRE_DEVICE, uint32_t(aDevice)); + /* STUB */ } void |