diff options
author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 23:22:08 +0000 |
---|---|---|
committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 23:22:08 +0000 |
commit | 558987967dfbaf67b7313ab0ee6482db27660717 (patch) | |
tree | 21cc67aace2daa574ca152884c84daa3478f1bee | |
parent | b75a1c8fd757d8a434efbf41aaa865bac882f766 (diff) | |
download | chromium_src-558987967dfbaf67b7313ab0ee6482db27660717.zip chromium_src-558987967dfbaf67b7313ab0ee6482db27660717.tar.gz chromium_src-558987967dfbaf67b7313ab0ee6482db27660717.tar.bz2 |
Histograms added for GPU Process Crashed, Died, Launched
BUG=62865
TEST=none
Review URL: http://codereview.chromium.org/5299003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67341 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gpu_process_host.cc | 17 | ||||
-rw-r--r-- | chrome/browser/gpu_process_host.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc index 639d100..2f5a8b7 100644 --- a/chrome/browser/gpu_process_host.cc +++ b/chrome/browser/gpu_process_host.cc @@ -6,6 +6,7 @@ #include "app/app_switches.h" #include "base/command_line.h" +#include "base/metrics/histogram.h" #include "base/thread.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_thread.h" @@ -28,6 +29,12 @@ namespace { +enum GPUProcessLifetimeEvent { + kLaunched, + kCrashed, + kGPUProcessLifetimeEvent_Max + }; + // Tasks used by this file class RouteOnUIThreadTask : public Task { public: @@ -343,6 +350,14 @@ bool GpuProcessHost::CanShutdown() { return true; } +void GpuProcessHost::OnChildDied() { + // Located in OnChildDied because OnProcessCrashed suffers from a race + // condition on Linux. The GPU process will only die if it crashes. + UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", + kCrashed, kGPUProcessLifetimeEvent_Max); + BrowserChildProcessHost::OnChildDied(); +} + void GpuProcessHost::OnProcessCrashed() { // TODO(alokp): Update gpu process crash rate. BrowserChildProcessHost::OnProcessCrashed(); @@ -393,6 +408,8 @@ bool GpuProcessHost::LaunchGpuProcess() { #endif cmd_line); + UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", + kLaunched, kGPUProcessLifetimeEvent_Max); return true; } diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h index 3ee2ba6..c7492eb 100644 --- a/chrome/browser/gpu_process_host.h +++ b/chrome/browser/gpu_process_host.h @@ -105,6 +105,7 @@ class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe { const ViewHostMsg_Resource_Request& request_data); virtual bool CanShutdown(); + virtual void OnChildDied(); virtual void OnProcessCrashed(); bool CanLaunchGpuProcess() const; |