Commit 5be9f726 authored by andresantoso's avatar andresantoso Committed by Commit bot

Reduce GPU watchdog polling frequency

Reduce GPU watchdog's polling interval from 2 seconds to 5 seconds.
Also remove unnecessary CheckArmed() call from DidProcessTask(). Although
CheckArmed() checks first whether it needs to post the task, WillProcessTask
and DidProcessTask is called so quickly that armed() still returns true, so we
ended up posting the task twice most of the time.

BUG=483622

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

Cr-Commit-Position: refs/heads/master@{#329709}
parent c7a5afd6
......@@ -21,7 +21,6 @@
namespace content {
namespace {
const int64 kCheckPeriodMs = 2000;
#if defined(OS_CHROMEOS)
const base::FilePath::CharType
kTtyFilePath[] = FILE_PATH_LITERAL("/sys/class/tty/tty0/active");
......@@ -113,7 +112,6 @@ void GpuWatchdogThread::GpuWatchdogTaskObserver::WillProcessTask(
void GpuWatchdogThread::GpuWatchdogTaskObserver::DidProcessTask(
const base::PendingTask& pending_task) {
watchdog_->CheckArmed();
}
GpuWatchdogThread::~GpuWatchdogThread() {
......@@ -168,7 +166,7 @@ void GpuWatchdogThread::OnAcknowledge() {
FROM_HERE,
base::Bind(&GpuWatchdogThread::OnCheck, weak_factory_.GetWeakPtr(),
was_suspended),
base::TimeDelta::FromMilliseconds(kCheckPeriodMs));
0.5 * timeout_);
}
void GpuWatchdogThread::OnCheck(bool after_suspend) {
......
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