Commit b7d00afd authored by Vikas Soni's avatar Vikas Soni Committed by Commit Bot

Increase SurfaceControl transaction ack hang detection timeout.

Increase SurfaceControl transaction ack hang detection timeout from 1sec
to 5sec.

Bug: 1037760
Change-Id: I0402c3c641f814b6388d2b08798d96bacfa4926e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2515227
Commit-Queue: vikas soni <vikassoni@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Auto-Submit: vikas soni <vikassoni@chromium.org>
Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823610}
parent 94e4fc0f
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/debug/dump_without_crashing.h" #include "base/debug/dump_without_crashing.h"
#include "base/posix/eintr_wrapper.h" #include "base/posix/eintr_wrapper.h"
#include "base/rand_util.h"
#include "base/strings/strcat.h" #include "base/strings/strcat.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
...@@ -645,7 +646,7 @@ void GLSurfaceEGLSurfaceControl::TransactionAckTimeoutManager:: ...@@ -645,7 +646,7 @@ void GLSurfaceEGLSurfaceControl::TransactionAckTimeoutManager::
if (!hang_detection_cb_.IsCancelled()) if (!hang_detection_cb_.IsCancelled())
return; return;
constexpr int kIdleDelaySeconds = 1; constexpr int kIdleDelaySeconds = 5;
hang_detection_cb_.Reset( hang_detection_cb_.Reset(
base::BindOnce(&GLSurfaceEGLSurfaceControl::TransactionAckTimeoutManager:: base::BindOnce(&GLSurfaceEGLSurfaceControl::TransactionAckTimeoutManager::
OnTransactionTimeout, OnTransactionTimeout,
...@@ -680,11 +681,15 @@ void GLSurfaceEGLSurfaceControl::TransactionAckTimeoutManager:: ...@@ -680,11 +681,15 @@ void GLSurfaceEGLSurfaceControl::TransactionAckTimeoutManager::
ScheduleHangDetection(); ScheduleHangDetection();
return; return;
} }
// Hang detection logic here.
LOG(ERROR) << "Transaction id " << transaction_id LOG(ERROR) << "Transaction id " << transaction_id
<< " haven't received any ack from past 1 second which indicates " << " haven't received any ack from past 5 second which indicates "
"it hanged"; "it hanged";
base::debug::DumpWithoutCrashing();
// Hang detection logic here. we want to limit the number of dumps to 10% of
// the cases to avoid seeing too many instances in crash report.
if (base::RandInt(1, 10) == 1)
base::debug::DumpWithoutCrashing();
} }
} // namespace gl } // namespace gl
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