Skip to content
Snippets Groups Projects
Commit 1c9810ba authored by vangelis@chromium.org's avatar vangelis@chromium.org
Browse files

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
parent 25f509de
No related merge requests found
......@@ -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;
}
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment