All changes are behind the "enable-gpu-main-time-keeper-metrics"
command-line flag. The new metrics are not added to XML since they are
mainly intended for local tests in our testbed.
Only fully supported on Windows and Mac as is.
Without the flag this change is basically a nop. [1]
With the flag:
CrGpuMain is added as thread suffix to the already existing
Scheduling.ThreadController.Xxx UMAs. The
ThreadController::RunLevelTracker::RunLevel::RunLevel instance for
thread name "CrGpuMain" will then disable subsampling and provide all
its UMA on a new and higher rate to support the new wall-time based
metrics.
Three new UMAs are produced for the .CrGpuMain suffix (and for .Other)
and they are aggregated for ~1 second before being logged:
Scheduling.ThreadController.ActiveVsWallTimePercentage
Scheduling.ThreadController.ActiveOnCpuVsWallTimePercentage
Scheduling.ThreadController.ActiveOffCpuVsWallTimePercentage
where "Active = ActiveOnCpu + ActiveOffCpu".
The aggregated metrics are reset after each UMA metric has been added.
See [2] for details.
An extensive set of tests have been performed on two different Windows
devices using https://henrik-and.github.io/crop-demo/ as driver for
GPU load.
Example for a high GPU load is given by [3] and one for a low load
by [4].
[1] A minor "total_idle_time_ += idle_time" is done in
ThreadController::RunLevelTracker::RunLevel::LogOnActiveMetrics also
without the flag.
[2] https://screenshot.googleplex.com/pL9KhwzqYU95unk
[3] https://paste.googleplex.com/6295780167516160
[4] https://paste.googleplex.com/6477783567433728
Bug: b/332864440
Change-Id: I354a0bf55beb2d785efdeb4e2bf64ec8d0d9edbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5447513
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Henrik Andreasson <henrika@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1296137}