Commit 3f2962f1 authored by tonyg's avatar tonyg Committed by Commit bot

Allow maximum timer coalescing of the GPU watchdog thread.

The exact wakeup times are don't-cares as long as the interval is regular.

BUG=411488

Review URL: https://codereview.chromium.org/567133002

Cr-Commit-Position: refs/heads/master@{#294978}
parent 56499744
...@@ -206,7 +206,9 @@ int GpuMain(const MainFunctionParams& parameters) { ...@@ -206,7 +206,9 @@ int GpuMain(const MainFunctionParams& parameters) {
// consuming has completed, otherwise the process is liable to be aborted. // consuming has completed, otherwise the process is liable to be aborted.
if (enable_watchdog && !delayed_watchdog_enable) { if (enable_watchdog && !delayed_watchdog_enable) {
watchdog_thread = new GpuWatchdogThread(kGpuTimeout); watchdog_thread = new GpuWatchdogThread(kGpuTimeout);
watchdog_thread->Start(); base::Thread::Options options;
options.timer_slack = base::TIMER_SLACK_MAXIMUM;
watchdog_thread->StartWithOptions(options);
} }
gpu::GPUInfo gpu_info; gpu::GPUInfo gpu_info;
...@@ -300,7 +302,9 @@ int GpuMain(const MainFunctionParams& parameters) { ...@@ -300,7 +302,9 @@ int GpuMain(const MainFunctionParams& parameters) {
if (enable_watchdog && delayed_watchdog_enable) { if (enable_watchdog && delayed_watchdog_enable) {
watchdog_thread = new GpuWatchdogThread(kGpuTimeout); watchdog_thread = new GpuWatchdogThread(kGpuTimeout);
watchdog_thread->Start(); base::Thread::Options options;
options.timer_slack = base::TIMER_SLACK_MAXIMUM;
watchdog_thread->StartWithOptions(options);
} }
// OSMesa is expected to run very slowly, so disable the watchdog in that // OSMesa is expected to run very slowly, so disable the watchdog in that
...@@ -495,7 +499,9 @@ bool StartSandboxLinux(const gpu::GPUInfo& gpu_info, ...@@ -495,7 +499,9 @@ bool StartSandboxLinux(const gpu::GPUInfo& gpu_info,
// with only one thread. // with only one thread.
res = LinuxSandbox::InitializeSandbox(); res = LinuxSandbox::InitializeSandbox();
if (watchdog_thread) { if (watchdog_thread) {
watchdog_thread->Start(); base::Thread::Options options;
options.timer_slack = base::TIMER_SLACK_MAXIMUM;
watchdog_thread->StartWithOptions(options);
} }
return res; return res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment