[Sampling profiler] Skip over samples in the past that we couldn't collect
Avoids racing to make up lost samples, and the bias resulting from that behavior, in the case where the sample tasks didn't execute on the expected schedule. This can happen during system suspend or in cases of system-wide jank. The correct solution is to skip the samples and continue sampling at the regular cadence, since the system was not actively executing in the interim. Expected impacts: For the UMA case, reduced bias towards execution immediately following resume. There will still be some bias towards the first 30 seconds of execution after resume because the profile scheduling remains unaware of suspend/resume cycles. For the tracing case, aligns the sampling exactly to the specified sampling interval on average. The sampling in the existing implementation was actually occurring on average at the specified interval plus half the timer tick interval. Bug: 876063 Change-Id: I6c0894bc9909131a4632765c6a6acc4678763bdf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2199918 Commit-Queue: Mike Wittman <wittman@chromium.org> Reviewed-by:Gabriel Charette <gab@chromium.org> Reviewed-by:
ssid <ssid@chromium.org> Cr-Commit-Position: refs/heads/master@{#771192}
Showing
Please register or sign in to comment