HighResolutionTimerManager is missing in GPU process |
|||
Issue descriptionWhen working on a related change I realized that HighResolutionTimerManager is not instantiated in the GPU process. That means that when the high resolution timer is activated by the GPU process it is always raised to 4 ms (rather than 1 ms) regardless of whether the machine is on battery power. That might not matter is most cases because the high resolution timer would still be raised by other Chrome processes to 1 ms. But I guess this is still not how it is intended to work. I might need to fix this as a part of Issue 736489 because I am adding the high resolution timer usage logging as a new responsibility of HighResolutionTimerManager, and I need that data for the GPU process.
,
Jun 30 2017
,
Jul 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/61507093a130b03867bb13996a2af515b67e4972 commit 61507093a130b03867bb13996a2af515b67e4972 Author: stanisc <stanisc@chromium.org> Date: Thu Jul 06 16:36:58 2017 Add UMA for High Resolution Timer Usage The goal of this change is to understand the pattern on activating the high resolution system timer on Windows and to track the improvement when we switch to GPU V-sync and improve task coalescing. The change consists of two parts: 1) In Time class I added two methods that allow to track the high resolution timer activation over an arbitrary time interval: void ResetHighResolutionTimerUsage(); double GetHighResolutionTimerUsage(); The first method resets the accumulated usage value and the second one returns the percentage of time the high resolution timer was activated since the last reset. 2) HighResolutionTimerManager looks like a perfect place to call the two new Time class functions. In general HighResolutionTimerManager takes the snapshot of the usage and logs the UMA metric every 10 minutes. There is a special logic for dealing with suspend / resume because we don't want to count the time when the machine is sleeping. I should mention that when fixing this bug I've noticed that HighResolutionTimerManager was missing in the GPU process. The main responsibility of HighResolutionTimerManager before this change was to change high-resolution timer interval between 1 ms and 4 ms depending on whether the machine is on battery power. The lack of HighResolutionTimerManager in the GPU process could theoretically result in running the high resolution timer at 4 ms interval even when the machine is on AC power. But in reality I think that wouldn't matter because other Chrome processes would likely have more impact on the actual high resolution timer frequency. BUG= 736489 , 736490 Review-Url: https://codereview.chromium.org/2951413003 Cr-Commit-Position: refs/heads/master@{#484626} [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/base/time/time.h [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/base/time/time_win.cc [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/base/time/time_win_unittest.cc [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/base/timer/hi_res_timer_manager.h [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/base/timer/hi_res_timer_manager_posix.cc [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/base/timer/hi_res_timer_manager_unittest.cc [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/base/timer/hi_res_timer_manager_win.cc [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/content/gpu/gpu_main.cc [modify] https://crrev.com/61507093a130b03867bb13996a2af515b67e4972/tools/metrics/histograms/histograms.xml
,
Jul 8 2017
,
Aug 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/82bd1928e0d3dd5d79b3c1e3c1656c1d43a44deb commit 82bd1928e0d3dd5d79b3c1e3c1656c1d43a44deb Author: John Bauman <jbauman@chromium.org> Date: Fri Aug 04 22:37:58 2017 Fix using_high_res_timer in GPU watchdog This should probably be measuring whether base::TimeTicks is high-res. Bug: 736490 Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: I18069a9f4f4d139648fa5be7ce940263038204d8 Reviewed-on: https://chromium-review.googlesource.com/601250 Reviewed-by: Stanislav Chiknavaryan <stanisc@chromium.org> Commit-Queue: John Bauman <jbauman@chromium.org> Cr-Commit-Position: refs/heads/master@{#492154} [modify] https://crrev.com/82bd1928e0d3dd5d79b3c1e3c1656c1d43a44deb/gpu/ipc/service/gpu_watchdog_thread.cc |
|||
►
Sign in to add a comment |
|||
Comment 1 by stanisc@chromium.org
, Jun 23 2017