Skip to content

Commit

Permalink
Cause GPU hangs on Windows to make crash dumps.
Browse files Browse the repository at this point in the history
This should help us debug any hangs that happen on startup.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11333002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164416 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jbauman@chromium.org committed Oct 26, 2012
1 parent 72b71bb commit 0d284e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion content/gpu/gpu_watchdog_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,14 @@ void GpuWatchdogThread::DeliberatelyTerminateToRecoverFromHang() {
LOG(ERROR) << "The GPU process hung. Terminating after "
<< timeout_.InMilliseconds() << " ms.";

if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kCrashOnGpuHang)) {
bool should_crash =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kCrashOnGpuHang);

#if defined(OS_WIN)
should_crash = true;
#endif

if (should_crash) {
// Deliberately crash the process to create a crash dump.
*((volatile int*)0) = 0x1337;
} else {
Expand Down

0 comments on commit 0d284e4

Please sign in to comment.