Bug 1338011 - Adds some telemetry probes feedback?bsmedberg r?dvander
MozReview-Commit-ID: BmwEjBiCBNo
--- a/gfx/ipc/GPUProcessManager.cpp
+++ b/gfx/ipc/GPUProcessManager.cpp
@@ -42,16 +42,23 @@
#include "mozilla/layers/UiCompositorControllerChild.h"
#endif // defined(MOZ_WIDGET_ANDROID)
namespace mozilla {
namespace gfx {
using namespace mozilla::layers;
+enum class FallbackType : uint32_t
+{
+ NONE = 0,
+ DECODINGDISABLED,
+ DISABLED,
+};
+
static StaticAutoPtr<GPUProcessManager> sSingleton;
GPUProcessManager*
GPUProcessManager::Get()
{
return sSingleton;
}
@@ -154,16 +161,19 @@ GPUProcessManager::DisableGPUProcess(con
return;
}
gfxConfig::SetFailed(Feature::GPU_PROCESS, FeatureStatus::Failed, aMessage);
gfxCriticalNote << aMessage;
gfxPlatform::NotifyGPUProcessDisabled();
+ Telemetry::Accumulate(Telemetry::GPU_PROCESS_CRASH_FALLBACKS,
+ uint32_t(FallbackType::DISABLED));
+
DestroyProcess();
ShutdownVsyncIOThread();
}
void
GPUProcessManager::EnsureGPUReady()
{
if (mProcess && !mProcess->IsConnected()) {
@@ -374,18 +384,24 @@ GPUProcessManager::OnProcessUnexpectedSh
DestroyProcess();
if (mNumProcessAttempts > uint32_t(gfxPrefs::GPUProcessMaxRestarts())) {
char disableMessage[64];
SprintfLiteral(disableMessage, "GPU process disabled after %d attempts",
mNumProcessAttempts);
DisableGPUProcess(disableMessage);
- } else if (mNumProcessAttempts > uint32_t(gfxPrefs::GPUProcessMaxRestartsWithDecoder())) {
+ } else if (mNumProcessAttempts > uint32_t(gfxPrefs::GPUProcessMaxRestartsWithDecoder()) &&
+ mDecodeVideoOnGpuProcess) {
mDecodeVideoOnGpuProcess = false;
+ Telemetry::Accumulate(Telemetry::GPU_PROCESS_CRASH_FALLBACKS,
+ uint32_t(FallbackType::DECODINGDISABLED));
+ } else {
+ Telemetry::Accumulate(Telemetry::GPU_PROCESS_CRASH_FALLBACKS,
+ uint32_t(FallbackType::NONE));
}
HandleProcessLost();
}
void
GPUProcessManager::HandleProcessLost()
{
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -986,26 +986,35 @@
"expires_in_version": "never",
"bug_numbers": [1297790, 1317796],
"kind": "exponential",
"high": 64000,
"n_buckets": 100,
"releaseChannelCollection": "opt-out",
"description": "GPU process launch time in milliseconds"
},
- "GPU_PROCESS_INITIALIZATION_TIME_MS" : {
+ "GPU_PROCESS_INITIALIZATION_TIME_MS": {
"alert_emails": ["george@mozilla.com", "danderson@mozilla.com"],
"expires_in_version": "never",
"bug_numbers": [1324095],
"kind": "exponential",
"high": 64000,
"n_buckets": 100,
"releaseChannelCollection": "opt-out",
"description": "GPU process initialization (excluding XPCOM and fork time) time in milliseconds"
},
+ "GPU_PROCESS_CRASH_FALLBACKS": {
+ "alert_emails": ["cpearce@mozilla.com", "jharris@mozilla.com"],
+ "expires_in_version": "never",
+ "bug_numbers": [1338011],
+ "kind": "enumerated",
+ "releaseChannelCollection": "opt-out",
+ "n_values": 10,
+ "description": "Count how often we use different fallbacks when the GPU process crashes: None=0, GPUProcessDecodingDisabled=1, GPUProcessDisabled=2"
+ },
"JS_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT": {
"alert_emails": ["jdemooij@mozilla.com"],
"expires_in_version": "never",
"kind": "enumerated",
"n_values": 10,
"description": "Use of SpiderMonkey's deprecated language extensions in web content: ForEach=0, DestructuringForIn=1 (obsolete), LegacyGenerator=2, ExpressionClosure=3, LetBlock=4 (obsolete), LetExpression=5 (obsolete), NoSuchMethod=6 (obsolete), FlagsArgument=7 (obsolete), RegExpSourceProp=8 (obsolete), RestoredRegExpStatics=9 (obsolete), BlockScopeFunRedecl=10"
},
"JS_DEPRECATED_LANGUAGE_EXTENSIONS_IN_ADDONS": {