summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 19:33:28 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 19:33:28 +0000
commit923b561488b3b5fd733c703c287c720d3c3f3088 (patch)
treee0b12a9565a87d67c2c3efc92f2fdcee2f4dd540 /chrome/browser
parentb4c158db2d55a600c9e92691fdbe8709d04f84c8 (diff)
downloadchromium_src-923b561488b3b5fd733c703c287c720d3c3f3088.zip
chromium_src-923b561488b3b5fd733c703c287c720d3c3f3088.tar.gz
chromium_src-923b561488b3b5fd733c703c287c720d3c3f3088.tar.bz2
Revert 63388 - http://build.chromium.org/buildbot/waterfall/builders/Mac10.6%20Tests%20(dbg)(2)/builds/10949
- 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 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/3979004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_about_handler.cc38
-rw-r--r--chrome/browser/gpu_process_host.cc11
-rw-r--r--chrome/browser/gpu_process_host.h7
-rw-r--r--chrome/browser/gpu_process_host_ui_shim.cc16
-rw-r--r--chrome/browser/gpu_process_host_ui_shim.h7
5 files changed, 31 insertions, 48 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 432474a..3cba7dc 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -762,38 +762,28 @@ std::string AboutGpu() {
html.append("</body></html> ");
} else {
html.append("<html><head><title>About GPU</title></head><body>\n");
- html.append("<h2>GPU Information</h2>\n");
- html.append("<table><tr>");
- html.append("<td><strong>Initialization time</strong></td><td>");
- html.append(base::Int64ToString(
- gpu_info.initialization_time().InMilliseconds()));
- html.append("</td></tr><tr><td>");
- html.append("<strong>Vendor ID</strong></td><td>");
+ html.append("<h2>GPU Information</h2><ul>\n");
+ html.append("<li><strong>Vendor ID:</strong> ");
html.append(base::StringPrintf("0x%04x", gpu_info.vendor_id()));
- html.append("</td></tr><tr><td>");
- html.append("<strong>Device ID</strong></td><td>");
+ html.append("<li><strong>Device ID:</strong> ");
html.append(base::StringPrintf("0x%04x", gpu_info.device_id()));
- html.append("</td></tr><tr><td>");
- html.append("<strong>Driver Version</strong></td><td>");
+ html.append("<li><strong>Driver Version:</strong> ");
html.append(WideToASCII(gpu_info.driver_version()).c_str());
- html.append("</td></tr><tr><td>");
- html.append("<strong>Pixel Shader Version</strong></td><td>");
- html.append(VersionNumberToString(gpu_info.pixel_shader_version()).c_str());
- html.append("</td></tr><tr><td>");
- html.append("<strong>Vertex Shader Version</strong></td><td>");
+ html.append("<li><strong>Pixel Shader Version:</strong> ");
+ html.append(VersionNumberToString(
+ gpu_info.pixel_shader_version()).c_str());
+ html.append("<li><strong>Vertex Shader Version:</strong> ");
html.append(VersionNumberToString(
- gpu_info.vertex_shader_version()).c_str());
- html.append("</td></tr><tr><td>");
- html.append("<strong>GL Version</strong></td><td>");
+ gpu_info.vertex_shader_version()).c_str());
+ html.append("<li><strong>GL Version:</strong> ");
html.append(VersionNumberToString(gpu_info.gl_version()).c_str());
- html.append("</td></tr></table>");
#if defined(OS_WIN)
- html.append("<h2>DirectX Diagnostics</h2>");
+ html.append("<li><strong>DirectX Diagnostics:</strong> ");
DxDiagNodeToHTML(&html, gpu_info.dx_diagnostics());
#endif
- html.append("</body></html>");
+ html.append("</ul></body></html> ");
}
return html;
}
@@ -1130,11 +1120,11 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) {
// Handle URLs to wreck the gpu process.
if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuCrashURL)) {
- GpuProcessHostUIShim::Get()->SendAboutGpuCrash();
+ GpuProcessHost::SendAboutGpuCrash();
return true;
}
if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuHangURL)) {
- GpuProcessHostUIShim::Get()->SendAboutGpuHang();
+ GpuProcessHost::SendAboutGpuHang();
return true;
}
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc
index b9e26e3..a33ef5c 100644
--- a/chrome/browser/gpu_process_host.cc
+++ b/chrome/browser/gpu_process_host.cc
@@ -94,7 +94,6 @@ bool GpuProcessHost::Init() {
static const char* const kSwitchNames[] = {
switches::kUseGL,
switches::kDisableGpuVsync,
- switches::kDisableGpuWatchdog,
switches::kDisableLogging,
switches::kEnableAcceleratedDecoding,
switches::kEnableLogging,
@@ -127,6 +126,16 @@ GpuProcessHost* GpuProcessHost::Get() {
return sole_instance_;
}
+// static
+void GpuProcessHost::SendAboutGpuCrash() {
+ Get()->Send(new GpuMsg_Crash());
+}
+
+// static
+void GpuProcessHost::SendAboutGpuHang() {
+ Get()->Send(new GpuMsg_Hang());
+}
+
bool GpuProcessHost::Send(IPC::Message* msg) {
if (!EnsureInitialized())
return false;
diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h
index 68e0496..0e14402 100644
--- a/chrome/browser/gpu_process_host.h
+++ b/chrome/browser/gpu_process_host.h
@@ -28,6 +28,13 @@ class GpuProcessHost : public BrowserChildProcessHost {
// Getter for the singleton. This will return NULL on failure.
static GpuProcessHost* Get();
+ // Tells the GPU process to crash. Useful for testing.
+ static void SendAboutGpuCrash();
+
+ // Tells the GPU process to let its main thread enter an infinite loop.
+ // Useful for testing.
+ static void SendAboutGpuHang();
+
// Shutdown routine, which should only be called upon process
// termination.
static void Shutdown();
diff --git a/chrome/browser/gpu_process_host_ui_shim.cc b/chrome/browser/gpu_process_host_ui_shim.cc
index 9ab296d..71db44b 100644
--- a/chrome/browser/gpu_process_host_ui_shim.cc
+++ b/chrome/browser/gpu_process_host_ui_shim.cc
@@ -74,19 +74,3 @@ void GpuProcessHostUIShim::CollectGraphicsInfoAsynchronously() {
FROM_HERE,
new SendOnIOThreadTask(new GpuMsg_CollectGraphicsInfo()));
}
-
-void GpuProcessHostUIShim::SendAboutGpuCrash() {
- DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
- BrowserThread::PostTask(
- BrowserThread::IO,
- FROM_HERE,
- new SendOnIOThreadTask(new GpuMsg_Crash()));
-}
-
-void GpuProcessHostUIShim::SendAboutGpuHang() {
- DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
- BrowserThread::PostTask(
- BrowserThread::IO,
- FROM_HERE,
- new SendOnIOThreadTask(new GpuMsg_Hang()));
-}
diff --git a/chrome/browser/gpu_process_host_ui_shim.h b/chrome/browser/gpu_process_host_ui_shim.h
index a65f29c..3e5d93b 100644
--- a/chrome/browser/gpu_process_host_ui_shim.h
+++ b/chrome/browser/gpu_process_host_ui_shim.h
@@ -46,13 +46,6 @@ class GpuProcessHostUIShim : public IPC::Channel::Sender,
// graphics card.
void CollectGraphicsInfoAsynchronously();
- // Tells the GPU process to crash. Useful for testing.
- void SendAboutGpuCrash();
-
- // Tells the GPU process to let its main thread enter an infinite loop.
- // Useful for testing.
- void SendAboutGpuHang();
-
private:
friend struct DefaultSingletonTraits<GpuProcessHostUIShim>;