diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-01 19:16:41 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-01 19:16:41 +0000 |
commit | df98a3963129c53e10e3b23ce747ecac5fe08e47 (patch) | |
tree | 4dd8643edc07dc1e69dea02db935c12152969119 | |
parent | 5aab6b6528025778fa2466ff3406559bfd1dccb9 (diff) | |
download | chromium_src-df98a3963129c53e10e3b23ce747ecac5fe08e47.zip chromium_src-df98a3963129c53e10e3b23ce747ecac5fe08e47.tar.gz chromium_src-df98a3963129c53e10e3b23ce747ecac5fe08e47.tar.bz2 |
Reland 73220 - GpuProcessHost does not relaunch GPU process after threshold no. of crashes.
Also added buckets to histograms to count the number of times the GPU process crashed in a single session.
TEST=simulate crashes, try
BUG=none
Review URL: http://codereview.chromium.org/6343010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73321 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gpu_process_host.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc index 1ced5c6..a1e8a66 100644 --- a/chrome/browser/gpu_process_host.cc +++ b/chrome/browser/gpu_process_host.cc @@ -36,8 +36,11 @@ namespace { enum GPUProcessLifetimeEvent { - LAUNCED, - CRASHED, + LAUNCHED, + DIED_FIRST_TIME, + DIED_SECOND_TIME, + DIED_THIRD_TIME, + DIED_FOURTH_TIME, GPU_PROCESS_LIFETIME_EVENT_MAX }; @@ -424,9 +427,10 @@ bool GpuProcessHost::CanShutdown() { void GpuProcessHost::OnChildDied() { SendOutstandingReplies(); // Located in OnChildDied because OnProcessCrashed suffers from a race - // condition on Linux. The GPU process will only die if it crashes. + // condition on Linux. UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", - CRASHED, GPU_PROCESS_LIFETIME_EVENT_MAX); + DIED_FIRST_TIME + g_gpu_crash_count, + GPU_PROCESS_LIFETIME_EVENT_MAX); BrowserChildProcessHost::OnChildDied(); } @@ -444,6 +448,9 @@ bool GpuProcessHost::CanLaunchGpuProcess() const { } bool GpuProcessHost::LaunchGpuProcess() { + if (g_gpu_crash_count >= kGpuMaxCrashCount) + return false; + const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); // If the single-process switch is present, just launch the GPU service in a @@ -508,7 +515,7 @@ bool GpuProcessHost::LaunchGpuProcess() { cmd_line); UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", - LAUNCED, GPU_PROCESS_LIFETIME_EVENT_MAX); + LAUNCHED, GPU_PROCESS_LIFETIME_EVENT_MAX); return true; } |