Bug 1516033. Make CONTENT_FRAME_TIME_REASON use the same timing as CONTENT_FRAME_TIME. r=mattwoodrow
authorJeff Muizelaar <jrmuizel@gmail.com>
Sat, 22 Dec 2018 05:00:51 +0000
changeset 508912 62fb01cb263112d420a47e4a34bfdabd4f36d944
parent 508911 324627be0cbc1632386eda812585da9c14fb5e70
child 508913 e7becb0458acf526890acf23d27b7659d69c43f5
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1516033
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1516033. Make CONTENT_FRAME_TIME_REASON use the same timing as CONTENT_FRAME_TIME. r=mattwoodrow It perhaps makes more sense to use the start of refresh but I'd like to switch to the start of the paint so that we get more consistent results between the two probes. Differential Revision: https://phabricator.services.mozilla.com/D15236
gfx/layers/ipc/LayerTransactionParent.cpp
gfx/layers/wr/WebRenderBridgeParent.cpp
--- a/gfx/layers/ipc/LayerTransactionParent.cpp
+++ b/gfx/layers/ipc/LayerTransactionParent.cpp
@@ -900,19 +900,16 @@ TransactionId LayerTransactionParent::Fl
     // (CompositorBridgeParent::CompositeToTarget), since they're using the same
     // thread. This can mean that compositing might start significantly late,
     // but this code will still detect it as having successfully started on the
     // right vsync (which is somewhat correct). We'd now have reduced time left
     // in the vsync interval to finish compositing, so the chances of a missed
     // frame increases. This is effectively including the RecvUpdate work as
     // part of the 'compositing' phase for this metric, but it isn't included in
     // COMPOSITE_TIME, and *is* included in CONTENT_FULL_PAINT_TIME.
-    latencyMs = (aCompositeEnd - mRefreshStartTime).ToMilliseconds();
-    latencyNorm = latencyMs / mVsyncRate.ToMilliseconds();
-    fracLatencyNorm = lround(latencyNorm * 100.0);
     if (fracLatencyNorm < 200) {
       // Success
       Telemetry::AccumulateCategorical(
           LABELS_CONTENT_FRAME_TIME_REASON::OnTime);
     } else {
       if (mTxnVsyncId == VsyncId() || aId == VsyncId() || mTxnVsyncId >= aId) {
         // Vsync ids are nonsensical, possibly something got trigged from
         // outside vsync?
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -1971,35 +1971,28 @@ TransactionId WebRenderBridgeParent::Flu
         latencyNorm = latencyMs / mVsyncRate.ToMilliseconds();
         fracLatencyNorm = lround(latencyNorm * 100.0);
       }
       Telemetry::Accumulate(Telemetry::CONTENT_FRAME_TIME_WITHOUT_UPLOAD,
                             fracLatencyNorm);
 
       // Record CONTENT_FRAME_TIME_REASON.
       //
-      // This uses the refresh start time (CONTENT_FRAME_TIME uses the start of
-      // display list building), since that includes layout/style time, and 200
-      // should correlate more closely with missing a vsync.
-      //
       // Also of note is that when the root WebRenderBridgeParent decides to
       // skip a composite (due to the Renderer being busy), that won't notify
       // child WebRenderBridgeParents. That failure will show up as the
       // composite starting late (since it did), but it's really a fault of a
       // slow composite on the previous frame, not a slow
       // CONTENT_FULL_PAINT_TIME. It would be nice to have a separate bucket for
       // this category (scene was ready on the next vsync, but we chose not to
       // composite), but I can't find a way to locate the right child
       // WebRenderBridgeParents from the root. WebRender notifies us of the
       // child pipelines contained within a render, after it finishes, but I
       // can't see how to query what child pipeline would have been rendered,
       // when we choose to not do it.
-      latencyMs = (aEndTime - transactionId.mRefreshStartTime).ToMilliseconds();
-      latencyNorm = latencyMs / mVsyncRate.ToMilliseconds();
-      fracLatencyNorm = lround(latencyNorm * 100.0);
       if (fracLatencyNorm < 200) {
         // Success
         Telemetry::AccumulateCategorical(
             LABELS_CONTENT_FRAME_TIME_REASON::OnTime);
       } else {
         if (transactionId.mVsyncId == VsyncId() ||
             aCompositeStartId == VsyncId() ||
             transactionId.mVsyncId >= aCompositeStartId) {