Bug 1297790 - Add telemetry probes for GPU process launch/launch-time/abort r=dvander

MozReview-Commit-ID: LgrdMOSZn8J
This commit is contained in:
George Wright 2016-10-20 11:33:40 -04:00
Родитель 81279910ba
Коммит 119e15b6b3
4 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -7,6 +7,7 @@
#include "gfxConfig.h"
#include "gfxPrefs.h"
#include "GPUProcessHost.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/CheckerboardReportService.h"
#include "mozilla/gfx/gfxVars.h"
#if defined(XP_WIN)
@ -79,6 +80,7 @@ GPUChild::EnsureGPUReady()
SendGetDeviceStatus(&data);
gfxPlatform::GetPlatform()->ImportGPUDeviceData(data);
Telemetry::AccumulateTimeDelta(Telemetry::GPU_PROCESS_LAUNCH_TIME_MS, mHost->GetLaunchTime());
mGPUReady = true;
}
@ -91,6 +93,7 @@ GPUChild::RecvInitComplete(const GPUDeviceData& aData)
}
gfxPlatform::GetPlatform()->ImportGPUDeviceData(aData);
Telemetry::AccumulateTimeDelta(Telemetry::GPU_PROCESS_LAUNCH_TIME_MS, mHost->GetLaunchTime());
mGPUReady = true;
return true;
}
@ -144,6 +147,8 @@ GPUChild::ActorDestroy(ActorDestroyReason aWhy)
mCrashReporter = nullptr;
}
#endif
Telemetry::Accumulate(Telemetry::SUBPROCESS_ABNORMAL_ABORT,
nsDependentCString(XRE_ChildProcessTypeToString(GeckoProcessType_GPU), 1));
}
gfxVars::RemoveReceiver(this);

Просмотреть файл

@ -39,6 +39,8 @@ GPUProcessHost::Launch()
MOZ_ASSERT(!mGPUChild);
mLaunchPhase = LaunchPhase::Waiting;
mLaunchTime = TimeStamp::Now();
if (!GeckoChildProcessHost::AsyncLaunch()) {
mLaunchPhase = LaunchPhase::Complete;
return false;

Просмотреть файл

@ -82,6 +82,14 @@ public:
return !!mGPUChild;
}
// Return the time stamp for when we tried to launch the GPU process. This is
// currently used for Telemetry so that we can determine how long GPU processes
// take to spin up. Note this doesn't denote a successful launch, just when we
// attempted launch.
TimeStamp GetLaunchTime() const {
return mLaunchTime;
}
// Called on the IO thread.
void OnChannelConnected(int32_t peer_pid) override;
void OnChannelError() override;
@ -122,6 +130,8 @@ private:
bool mShutdownRequested;
bool mChannelClosed;
TimeStamp mLaunchTime;
};
} // namespace gfx

Просмотреть файл

@ -944,6 +944,16 @@
"bug_numbers": [1255198],
"description": "This metric is recorded every time a navigator.geolocation.watchPosition() request gets allowed/fulfilled. A false value is recorded if the owner is not visible according to document.isVisible."
},
"GPU_PROCESS_LAUNCH_TIME_MS" : {
"alert_emails": ["george@mozilla.com", "danderson@mozilla.com"],
"expires_in_version": "never",
"bug_numbers": [1297790],
"kind": "exponential",
"high": 1000,
"n_buckets": 50,
"releaseChannelCollection": "opt-out",
"description": "GPU process launch time in milliseconds"
},
"JS_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT": {
"alert_emails": ["jdemooij@mozilla.com"],
"expires_in_version": "never",