diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 18:43:22 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 18:43:22 +0000 |
commit | dcc7b326b585c5de60590cd808aed91342311d05 (patch) | |
tree | 3743f9a91ccbbffb0961b6569622ac8d10867f75 /chrome/common/gpu_messages.cc | |
parent | 155e86ad19e6b938796ceeffcf2c6143b78614d1 (diff) | |
download | chromium_src-dcc7b326b585c5de60590cd808aed91342311d05.zip chromium_src-dcc7b326b585c5de60590cd808aed91342311d05.tar.gz chromium_src-dcc7b326b585c5de60590cd808aed91342311d05.tar.bz2 |
Relanding 61718.
I disabled the GPU watchdog in three new cases:
- If the OSMesa software renderer is in use. This will disable it on bots.
- When running on valgrind, whether on a bot or locally.
- In debug builds
I added a GPU process initialization time to the GPU info.
I moved the GPU initialization code outside the watchdog protection because it can take a long time and trigger the watchdog.
I increased the timeout. I set up a field trial with different timeouts to see the rate of failure for each period.
I made ui_tests always run with OSMesa, for consistent operation on bots and when run locally.
Original CL description:
I added a watchdog thread that intermitently checks the main thread can respond
to tasks posted on its message queue.
I fixed some bugs that preventede GGL from failing when the GPU channel was
lost.
Added a command line swith to disable the watchdog thread for debugging
purposes.
TEST=try, local testing of all features
BUG=none
Review URL: http://codereview.chromium.org/3794011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gpu_messages.cc')
-rw-r--r-- | chrome/common/gpu_messages.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/common/gpu_messages.cc b/chrome/common/gpu_messages.cc index db7f597..e138a43 100644 --- a/chrome/common/gpu_messages.cc +++ b/chrome/common/gpu_messages.cc @@ -10,6 +10,7 @@ #include "gfx/rect.h" #include "gfx/size.h" #include "ipc/ipc_channel_handle.h" +#include "ipc/ipc_message_utils.h" #define MESSAGES_INTERNAL_IMPL_FILE \ "chrome/common/gpu_messages_internal.h" @@ -80,6 +81,7 @@ void ParamTraits<GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params> ::Log( #endif // if defined(OS_MACOSX) void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) { + ParamTraits<base::TimeDelta> ::Write(m, p.initialization_time()); m->WriteUInt32(p.vendor_id()); m->WriteUInt32(p.device_id()); m->WriteWString(p.driver_version()); @@ -94,6 +96,7 @@ void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) { } bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) { + base::TimeDelta initialization_time; uint32 vendor_id; uint32 device_id; std::wstring driver_version; @@ -101,13 +104,15 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) { uint32 vertex_shader_version; uint32 gl_version; bool can_lose_context; - bool ret = m->ReadUInt32(iter, &vendor_id); + bool ret = ParamTraits<base::TimeDelta> ::Read(m, iter, &initialization_time); + ret = ret && m->ReadUInt32(iter, &vendor_id); ret = ret && m->ReadUInt32(iter, &device_id); ret = ret && m->ReadWString(iter, &driver_version); ret = ret && m->ReadUInt32(iter, &pixel_shader_version); ret = ret && m->ReadUInt32(iter, &vertex_shader_version); ret = ret && m->ReadUInt32(iter, &gl_version); ret = ret && m->ReadBool(iter, &can_lose_context); + p->SetInitializationTime(initialization_time); p->SetGraphicsInfo(vendor_id, device_id, driver_version, @@ -126,7 +131,9 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) { } void ParamTraits<GPUInfo> ::Log(const param_type& p, std::string* l) { - l->append(StringPrintf("<GPUInfo> %x %x %ls %d", + l->append(StringPrintf("<GPUInfo> %d %x %x %ls %d", + static_cast<int32>( + p.initialization_time().InMilliseconds()), p.vendor_id(), p.device_id(), p.driver_version().c_str(), |