Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(948)

Unified Diff: content/gpu/gpu_watchdog_thread.h

Issue 1980263002: GPU Watchdog to check I/O before terminating GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_common.gypi ('k') | content/gpu/gpu_watchdog_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_watchdog_thread.h
diff --git a/content/gpu/gpu_watchdog_thread.h b/content/gpu/gpu_watchdog_thread.h
index 68d3cd8cb8d7c9b6574e69fa21f21d418b311b5a..56b2db83abb24d90bad9fcf3b0def728f3bf99c0 100644
--- a/content/gpu/gpu_watchdog_thread.h
+++ b/content/gpu/gpu_watchdog_thread.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_GPU_GPU_WATCHDOG_THREAD_H_
#define CONTENT_GPU_GPU_WATCHDOG_THREAD_H_
+#include "base/files/file.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -74,6 +75,7 @@ class GpuWatchdogThread : public base::Thread,
void OnAcknowledge();
void OnCheck(bool after_suspend);
+ void BeginTerminating();
void DeliberatelyTerminateToRecoverFromHang();
#if defined(USE_X11)
void SetupXServer();
@@ -131,6 +133,14 @@ class GpuWatchdogThread : public base::Thread,
base::Time check_time_;
base::TimeTicks check_timeticks_;
+#if defined(OS_WIN)
+ // Writing to this temp file is used as an additional step before crashing the
+ // process. That should help to distinguish true hangs from the cases when the
+ // watched thread is running slow being blocked on hard faults or other I/O.
+ base::File temp_file_for_io_checking_;
+ base::TimeDelta io_check_duration_;
+#endif
+
#if defined(USE_X11)
XDisplay* display_;
gfx::AcceleratedWidget window_;
« no previous file with comments | « content/content_common.gypi ('k') | content/gpu/gpu_watchdog_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698