New issue
Advanced search Search tips

Issue 790759 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 508718
issue 790761



Sign in to add a comment

Track frame invalidation sources in LatencyInfo

Project Member Reported by briander...@chromium.org, Nov 30 2017

Issue description

We should track as many frame producers as we can, including:
* Renderer main.
* Renderer compositor.
* Browser main.
* Browser compositor.
* Offscreen canvas.
* Video.

 
Blocking: 790761
Cc: -flackr@chromium.org sadrul@chromium.org
Cc: flackr@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/242b9b0d6af44d087f29d3a1ed389242efcda5fc

commit 242b9b0d6af44d087f29d3a1ed389242efcda5fc
Author: Brian Anderson <brianderson@chromium.org>
Date: Wed Dec 06 21:06:26 2017

cc:: Track timing of frame sources in LatencyInfo.

Adds LatencyInfo entries for 5 frame sources:
1) Renderer main.
2) Renderer compositor.
3) UI main.
4) UI compositor.
5) Display compositor.

These will be used to calculate metrics in followup patches.

This patch also:
* Discards LatencyInfos that don't result in damage in the Display,
    which is consistent with what we do earlier in the pipeline.
    The exception being snapshot requests to keep them working.
* Adds a LatencyInfo::TraceIntermediateFlowEvents helper.
* Fixes LayerTreeHostImpl::DrawLayers so it only adds
    INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT in the Renderer.

Bug: 790759
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I478db123d536654acf3633ca5efb4e4d20132e78
Reviewed-on: https://chromium-review.googlesource.com/783849
Commit-Queue: Brian Anderson <brianderson@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522191}
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/cc/trees/proxy_main.cc
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/cc/trees/single_thread_proxy.cc
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/components/viz/service/display/display.cc
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/components/viz/service/display/display.h
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/components/viz/service/display/display_scheduler.h
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/components/viz/service/display/display_unittest.cc
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/components/viz/test/compositor_frame_helpers.cc
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/components/viz/test/compositor_frame_helpers.h
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/ui/latency/latency_info.cc
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/ui/latency/latency_info.h
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/ui/latency/mojo/latency_info.mojom
[modify] https://crrev.com/242b9b0d6af44d087f29d3a1ed389242efcda5fc/ui/latency/mojo/latency_info_struct_traits.cc

Blocking: 508718
Project Member

Comment 6 by bugdroid1@chromium.org, May 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/79758111c936db9c035d0185d54428ec1412910d

commit 79758111c936db9c035d0185d54428ec1412910d
Author: Brian Anderson <brianderson@chromium.org>
Date: Tue May 29 19:21:00 2018

ui: Improve FrameMetrics tracing.

* Enable FrameMetrics to differentiate between source type,
    source thread, and compile target.
* Report sample count for worst windows.
* Move tracing logic from StreamAnalyzer to StreamAnalysis,
    which allows results to be stored and traced at a later
    point.

Bug: 790759
Change-Id: I763a0f354d97119c16635675a2b9fa29a947f417
Reviewed-on: https://chromium-review.googlesource.com/1072872
Commit-Queue: Brian Anderson <brianderson@chromium.org>
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562543}
[modify] https://crrev.com/79758111c936db9c035d0185d54428ec1412910d/ui/latency/frame_metrics.cc
[modify] https://crrev.com/79758111c936db9c035d0185d54428ec1412910d/ui/latency/frame_metrics.h
[modify] https://crrev.com/79758111c936db9c035d0185d54428ec1412910d/ui/latency/frame_metrics_unittest.cc
[modify] https://crrev.com/79758111c936db9c035d0185d54428ec1412910d/ui/latency/stream_analyzer.cc
[modify] https://crrev.com/79758111c936db9c035d0185d54428ec1412910d/ui/latency/stream_analyzer.h
[modify] https://crrev.com/79758111c936db9c035d0185d54428ec1412910d/ui/latency/windowed_analyzer.cc
[modify] https://crrev.com/79758111c936db9c035d0185d54428ec1412910d/ui/latency/windowed_analyzer.h

Project Member

Comment 7 by bugdroid1@chromium.org, May 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d0587ce703d19e04f76a3d319a1499943a12324

commit 2d0587ce703d19e04f76a3d319a1499943a12324
Author: Brian Anderson <brianderson@chromium.org>
Date: Thu May 31 00:30:06 2018

trace_event: Add FrameMetrics memory overhead type.

Bug: 790759
Change-Id: I4655e5763198a6eab8b407f36383f756d8484ba6
Reviewed-on: https://chromium-review.googlesource.com/1072878
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Commit-Queue: Brian Anderson <brianderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563087}
[modify] https://crrev.com/2d0587ce703d19e04f76a3d319a1499943a12324/base/trace_event/trace_event_memory_overhead.cc
[modify] https://crrev.com/2d0587ce703d19e04f76a3d319a1499943a12324/base/trace_event/trace_event_memory_overhead.h

Project Member

Comment 8 by bugdroid1@chromium.org, May 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a0348692b6da91172956b6e690bc44afd3c6d397

commit a0348692b6da91172956b6e690bc44afd3c6d397
Author: Brian Anderson <brianderson@chromium.org>
Date: Thu May 31 19:09:59 2018

ui: Defer expensive parts of tracing FrameMetrics.

On a Linux z840, the cost decreases from ~25us to ~7us per trace
at the site of tracing.

Bug: 790759
Change-Id: Ib40dccbf6e5f384e907e2640748912068745131f
Reviewed-on: https://chromium-review.googlesource.com/1072894
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Brian Anderson <brianderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563340}
[modify] https://crrev.com/a0348692b6da91172956b6e690bc44afd3c6d397/ui/latency/frame_metrics.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e7062214cb15a554424106ff156f724c7858608d

commit e7062214cb15a554424106ff156f724c7858608d
Author: Brian Anderson <brianderson@chromium.org>
Date: Thu Jun 07 23:29:28 2018

ui: Add SkippedFrameTracker for FrameMetrics

Sources that run on BeginFrames can delegate their skipped
frame logic to SkippedFrameTracker.

SkippedFrameTracker handles the following corner cases:
1) when non-consecutive BeginFrames are received.
2) when the producer is not trying to produce.

Bug: 790759
Change-Id: I99d4067d4eab79f220b892256d8d3d49d1af1209
Reviewed-on: https://chromium-review.googlesource.com/1070994
Commit-Queue: Brian Anderson <brianderson@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565459}
[modify] https://crrev.com/e7062214cb15a554424106ff156f724c7858608d/ui/latency/BUILD.gn
[modify] https://crrev.com/e7062214cb15a554424106ff156f724c7858608d/ui/latency/frame_metrics.h
[add] https://crrev.com/e7062214cb15a554424106ff156f724c7858608d/ui/latency/skipped_frame_tracker.cc
[add] https://crrev.com/e7062214cb15a554424106ff156f724c7858608d/ui/latency/skipped_frame_tracker.h
[add] https://crrev.com/e7062214cb15a554424106ff156f724c7858608d/ui/latency/skipped_frame_tracker_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cf257bfa3df02b0a7ff76925452ca012a02e9398

commit cf257bfa3df02b0a7ff76925452ca012a02e9398
Author: Brian Anderson <brianderson@chromium.org>
Date: Mon Jun 11 20:54:25 2018

cc: Use FrameMetrics in LTHI.

Tracks throughput, latency, and smoothness of the
compositor thread.

Will output a trace that includes a summary of the
stats every time a frame is displayed.

Bug: 790759
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I85c68bf28e6ce72be8c0b84eca25b839d2126198
Reviewed-on: https://chromium-review.googlesource.com/1074192
Commit-Queue: Brian Anderson <brianderson@chromium.org>
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566141}
[modify] https://crrev.com/cf257bfa3df02b0a7ff76925452ca012a02e9398/cc/DEPS
[modify] https://crrev.com/cf257bfa3df02b0a7ff76925452ca012a02e9398/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/cf257bfa3df02b0a7ff76925452ca012a02e9398/cc/trees/layer_tree_host_impl.h
[modify] https://crrev.com/cf257bfa3df02b0a7ff76925452ca012a02e9398/ui/latency/frame_metrics.cc
[modify] https://crrev.com/cf257bfa3df02b0a7ff76925452ca012a02e9398/ui/latency/frame_metrics.h

Cc: yiyix@chromium.org chiniforooshan@chromium.org
Components: Internals>GPU>Metrics
Owner: ----
Status: Available (was: Assigned)
Cc: -junov@chromium.org

Sign in to add a comment