summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 01:55:17 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 01:55:17 +0000
commit9665973cfe562be5aaa231b7caec720c84614e31 (patch)
tree02025486959bb172fec55dbec64fc5ec2e05039e /content
parent1ff7b819a7f7185e7f82d844a0d8f1e50de27b35 (diff)
downloadchromium_src-9665973cfe562be5aaa231b7caec720c84614e31.zip
chromium_src-9665973cfe562be5aaa231b7caec720c84614e31.tar.gz
chromium_src-9665973cfe562be5aaa231b7caec720c84614e31.tar.bz2
GPU process sends IPC to browser process indicating success of initialization.
This is used for a histogram to measure the proportion of normal GPU process terminations that are caused by failure to initialize. BUG=142797 Review URL: https://chromiumcodereview.appspot.com/10872051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/gpu/gpu_process_host.cc5
-rw-r--r--content/browser/gpu/gpu_process_host.h1
-rw-r--r--content/common/gpu/gpu_messages.h4
-rw-r--r--content/gpu/gpu_child_thread.cc2
4 files changed, 12 insertions, 0 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 580a05c..8f8d4c2 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -469,6 +469,7 @@ bool GpuProcessHost::Send(IPC::Message* msg) {
bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
DCHECK(CalledOnValidThread());
IPC_BEGIN_MESSAGE_MAP(GpuProcessHost, message)
+ IPC_MESSAGE_HANDLER(GpuHostMsg_Initialized, OnInitialized)
IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished, OnChannelEstablished)
IPC_MESSAGE_HANDLER(GpuHostMsg_CommandBufferCreated, OnCommandBufferCreated)
IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyCommandBuffer, OnDestroyCommandBuffer)
@@ -560,6 +561,10 @@ void GpuProcessHost::CreateViewCommandBuffer(
}
}
+void GpuProcessHost::OnInitialized(bool result) {
+ UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", result);
+}
+
void GpuProcessHost::OnChannelEstablished(
const IPC::ChannelHandle& channel_handle) {
TRACE_EVENT0("gpu", "GpuProcessHostUIShim::OnChannelEstablished");
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index bf6b96b..3e26692 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -116,6 +116,7 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
virtual void OnProcessCrashed(int exit_code) OVERRIDE;
// Message handlers.
+ void OnInitialized(bool result);
void OnChannelEstablished(const IPC::ChannelHandle& channel_handle);
void OnCommandBufferCreated(const int32 route_id);
void OnDestroyCommandBuffer(int32 surface_id);
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index 3e96bb7..d3d9a4c 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -278,6 +278,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(GpuHostMsg_CreateViewCommandBuffer,
GPUCreateCommandBufferConfig, /* init_params */
int32 /* route_id */)
+// Response from GPU to a GputMsg_Initialize message.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_Initialized,
+ bool /* result */)
+
// Response from GPU to a GpuHostMsg_EstablishChannel message.
IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished,
IPC::ChannelHandle /* channel_handle */)
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 9302ab9c..2e318a7 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -114,6 +114,8 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
}
void GpuChildThread::OnInitialize() {
+ Send(new GpuHostMsg_Initialized(!dead_on_arrival_));
+
if (dead_on_arrival_) {
VLOG(1) << "Exiting GPU process due to errors during initialization";
MessageLoop::current()->Quit();