diff options
author | vangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 01:23:47 +0000 |
---|---|---|
committer | vangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 01:23:47 +0000 |
commit | 1c9810ba038daabed9fbbd4bc8c61ef4e32e8a71 (patch) | |
tree | 985b847484177c3d8cd32ef4a980b5000a69bf90 | |
parent | 25f509de98b84181c1aae1ab0a07bee6bd584920 (diff) | |
download | chromium_src-1c9810ba038daabed9fbbd4bc8c61ef4e32e8a71.zip chromium_src-1c9810ba038daabed9fbbd4bc8c61ef4e32e8a71.tar.gz chromium_src-1c9810ba038daabed9fbbd4bc8c61ef4e32e8a71.tar.bz2 |
Add UMA histogram recording instances of GPU process blocking due to blacklist matches.
BUG=69172
Review URL: http://codereview.chromium.org/6111005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71127 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gpu_process_host.cc | 27 | ||||
-rw-r--r-- | chrome/browser/gpu_process_host.h | 2 |
2 files changed, 23 insertions, 6 deletions
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc index 8e7ac68..8741e4e 100644 --- a/chrome/browser/gpu_process_host.cc +++ b/chrome/browser/gpu_process_host.cc @@ -38,10 +38,16 @@ namespace { +enum GPUBlacklistTestResult { + BLOCKED, + ALLOWED, + BLACKLIST_TEST_RESULT_MAX +}; + enum GPUProcessLifetimeEvent { - kLaunched, - kCrashed, - kGPUProcessLifetimeEvent_Max + LAUNCED, + CRASHED, + GPU_PROCESS_LIFETIME_EVENT_MAX }; // Tasks used by this file @@ -80,7 +86,8 @@ void RouteOnUIThread(const IPC::Message& message) { GpuProcessHost::GpuProcessHost() : BrowserChildProcessHost(GPU_PROCESS, NULL), initialized_(false), - initialized_successfully_(false) { + initialized_successfully_(false), + blacklist_result_recorded_(false) { DCHECK_EQ(sole_instance_, static_cast<GpuProcessHost*>(NULL)); } @@ -221,11 +228,19 @@ void GpuProcessHost::OnChannelEstablished( const ChannelRequest& request = sent_requests_.front(); // Currently if any of the GPU features are blacklised, we don't establish a // GPU channel. + GPUBlacklistTestResult test_result; if (gpu_feature_flags.flags() != 0) { Send(new GpuMsg_CloseChannel(channel_handle)); SendEstablishChannelReply(IPC::ChannelHandle(), gpu_info, request.filter); + test_result = BLOCKED; } else { SendEstablishChannelReply(channel_handle, gpu_info, request.filter); + test_result = ALLOWED; + } + if (!blacklist_result_recorded_) { + UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResults", + test_result, BLACKLIST_TEST_RESULT_MAX); + blacklist_result_recorded_ = true; } sent_requests_.pop(); } @@ -509,7 +524,7 @@ 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); + CRASHED, GPU_PROCESS_LIFETIME_EVENT_MAX); BrowserChildProcessHost::OnChildDied(); } @@ -572,7 +587,7 @@ bool GpuProcessHost::LaunchGpuProcess() { cmd_line); UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", - kLaunched, kGPUProcessLifetimeEvent_Max); + LAUNCED, GPU_PROCESS_LIFETIME_EVENT_MAX); return true; } diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h index 9a7a90d..5958a3b 100644 --- a/chrome/browser/gpu_process_host.h +++ b/chrome/browser/gpu_process_host.h @@ -124,6 +124,8 @@ class GpuProcessHost : public BrowserChildProcessHost, bool initialized_; bool initialized_successfully_; + bool blacklist_result_recorded_; + scoped_ptr<GpuBlacklist> gpu_blacklist_; // These are the channel requests that we have already sent to |