Commit 32ae2261 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

viz: Report how far ahead invalid presentation timestamps are.

On android, it turns out the presentation timestamp coming from the
driver can be from the future. Report how far ahead in the future
these timestamps are.

BUG=894440

Change-Id: Ic9bf5620721de3279e8b74277273e8db63da0842
Reviewed-on: https://chromium-review.googlesource.com/c/1294193
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601737}
parent 17abfac6
......@@ -526,7 +526,14 @@ void Display::DidReceivePresentationFeedback(
const auto swap_time = pending_presented_callbacks_.front().first;
DCHECK(!swap_time.is_null());
if (!feedback.timestamp.is_null()) {
if (feedback.timestamp > base::TimeTicks::Now()) {
const auto now = base::TimeTicks::Now();
if (feedback.timestamp > now) {
const auto diff = feedback.timestamp - now;
// This collects the time-delta in buckets from 10ms up-to 3minutes. This
// should provide sufficient information about the spread.
// https://crbug.com/894440
UMA_HISTOGRAM_MEDIUM_TIMES(
"Graphics.PresentationTimestamp.InvalidFromFuture", diff);
base::debug::DumpWithoutCrashing();
// In debug builds, just crash immediately.
DCHECK(false);
......
......@@ -36378,6 +36378,18 @@ uploading your change for review.
</summary>
</histogram>
<histogram name="Graphics.PresentationTimestamp.InvalidFromFuture" units="ms"
expires_after="2019-01-31">
<owner>sadrul@chromium.org</owner>
<summary>
Presentation timestamp comes from the driver when showing a display frame on
screen. These timestamps can sometimes be in the future. This metric records
how far in the future these timestamps can be. If the timestamp is not in
the future, then this metric is not recorded. This metric is recorded only
on Android.
</summary>
</histogram>
<histogram name="GraphicsPipeline.ReceivedBeginFrame" units="microseconds">
<owner>yiyix@chromium.org</owner>
<owner>chrome-gpu-metrics@google.com</owner>
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