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

Unified Diff: content/browser/gpu/gpu_process_host.cc

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 feedback Created 4 years, 7 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 | « no previous file | content/gpu/gpu_watchdog_thread.h » ('j') | content/gpu/gpu_watchdog_thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 9bf57997951c7f8e066b298ec22040004d323d7a..961b4d59888ed5774670a82326d26f3cf30846ea 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -13,6 +13,7 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/command_line.h"
+#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -259,6 +260,18 @@ class GpuSandboxedProcessLauncherDelegate
}
}
+ // Enable GPU watchdog to write to a temp file to test whether I/O
+ // is a bottleneck.
+ base::FilePath temp_dir_path;
+ if (GetTempDir(&temp_dir_path)) {
+ base::FilePath temp_file_path = temp_dir_path.Append(L"gpu-watchdog.tmp");
+ result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
+ sandbox::TargetPolicy::FILES_ALLOW_ANY,
+ temp_file_path.value().c_str());
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
+ }
+
return true;
}
#elif defined(OS_POSIX)
« no previous file with comments | « no previous file | content/gpu/gpu_watchdog_thread.h » ('j') | content/gpu/gpu_watchdog_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698