Telemetry: Remove stubs and related code

This commit is contained in:
adeshkp 2019-01-12 06:20:31 -05:00 • committed by Roy Tam
commit aea50f182f
134 changed files with 68 additions and 3422 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -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<nsIObserverService> obsvc = services::GetObserverService()) {
obsvc->NotifyObservers(nullptr, "compositor:created", nullptr);
}
}));
}
void

View file

@ -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<gfxFontFamily>& 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;
}

View file

@ -22,7 +22,6 @@
#include "nsIGfxInfo.h"
#include "nsServiceManagerUtils.h"
#include "nsTArray.h"
#include "mozilla/Telemetry.h"
#include "GeckoProfiler.h"
#include "nsIWindowsRegKey.h"
@ -1480,12 +1479,6 @@ gfxWindowsPlatform::InitializeD3D11Config()
}
}
/* static */ void
gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode aDevice)
{
/* STUB */
}
void
gfxWindowsPlatform::InitializeDevices()
{
@ -1523,18 +1516,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

View file

@ -230,8 +230,6 @@ public:
}
bool SupportsPluginDirectDXGIDrawing();
static void RecordContentDeviceFailure(mozilla::gfx::TelemetryDeviceCode aDevice);
protected:
bool AccelerateLayersByDefault() override {
return true;