summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorscheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 00:10:50 +0000
committerscheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 00:10:50 +0000
commit7f3a2cfa5bd4f04195c8eb044258f4c7cba5141a (patch)
treec7bbd990b886262b380667622e2bbe3ce3a04c49 /content/common
parentb184ddebb9646658091716dc330a0098a7e23800 (diff)
downloadchromium_src-7f3a2cfa5bd4f04195c8eb044258f4c7cba5141a.zip
chromium_src-7f3a2cfa5bd4f04195c8eb044258f4c7cba5141a.tar.gz
chromium_src-7f3a2cfa5bd4f04195c8eb044258f4c7cba5141a.tar.bz2
Histogram added: GPU.GPUProcessLaunchCause
- This will help distinguish why the GPU process was started. Also, corrected code in "about:" page parsing to not spawn the GPU process unless a GPU related page is being requested. BUG=78361 TEST=about:histograms includes GPU.GPUProcessLaunchCause after GPU use (e.g. about:gpu). Review URL: http://codereview.chromium.org/6794002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu_messages.h10
-rw-r--r--content/common/gpu_process_launch_causes.h24
2 files changed, 31 insertions, 3 deletions
diff --git a/content/common/gpu_messages.h b/content/common/gpu_messages.h
index 9e510b5..c2cc216 100644
--- a/content/common/gpu_messages.h
+++ b/content/common/gpu_messages.h
@@ -5,16 +5,17 @@
#include <vector>
#include <string>
+
#include "base/shared_memory.h"
#include "content/common/common_param_traits.h"
#include "content/common/gpu_info.h"
-#include "gpu/ipc/gpu_command_buffer_traits.h"
+#include "content/common/gpu_process_launch_causes.h"
#include "gpu/command_buffer/common/command_buffer.h"
+#include "gpu/ipc/gpu_command_buffer_traits.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
-
// Multiply-included message file, hence no include guard.
#define IPC_MESSAGE_START GpuMsgStart
@@ -117,6 +118,8 @@ IPC_STRUCT_TRAITS_BEGIN(GPUInfo)
#endif
IPC_STRUCT_TRAITS_END()
+IPC_ENUM_TRAITS(content::CauseForGpuLaunch)
+
//------------------------------------------------------------------------------
// GPU Messages
// These are messages from the browser to the GPU process.
@@ -199,7 +202,8 @@ IPC_MESSAGE_CONTROL3(GpuMsg_GpuChannelEstablished,
// A renderer sends this when it wants to create a connection to the GPU
// process. The browser will create the GPU process if necessary, and will
// return a handle to the channel via a GpuChannelEstablished message.
-IPC_MESSAGE_CONTROL0(GpuHostMsg_EstablishGpuChannel)
+IPC_MESSAGE_CONTROL1(GpuHostMsg_EstablishGpuChannel,
+ content::CauseForGpuLaunch)
// A renderer sends this to the browser process to provide a synchronization
// point for GPU operations, in particular to make sure the GPU channel has
diff --git a/content/common/gpu_process_launch_causes.h b/content/common/gpu_process_launch_causes.h
new file mode 100644
index 0000000..c84f9fe9
--- /dev/null
+++ b/content/common/gpu_process_launch_causes.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_PROCESS_LAUNCH_CAUSES_H_
+#define CONTENT_COMMON_GPU_PROCESS_LAUNCH_CAUSES_H_
+#pragma once
+
+namespace content {
+
+enum CauseForGpuLaunch {
+ CAUSE_FOR_GPU_LAUNCH_ABOUT_GPUCRASH,
+ CAUSE_FOR_GPU_LAUNCH_ABOUT_GPUHANG,
+ CAUSE_FOR_GPU_LAUNCH_GPUDATAMANAGER_REQUESTCOMPLETEGPUINFOIFNEEDED,
+ CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT,
+ CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETHOSTVIEWMAC_DEALLOCFAKEPLUGINWINDOWHANDLE,
+ CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE,
+ CAUSE_FOR_GPU_LAUNCH_MAX_ENUM
+};
+
+} // namespace content
+
+
+#endif // CONTENT_COMMON_GPU_PROCESS_LAUNCH_CAUSES_H_