content: Avoid integer overflow when scaling CPU time deltas.
|time_delta| can be a rather large microsecond value, multiplying with |process_cpu_time_delta| can cause uint64 overflow. Instead, compute a double factor from time_delta/total_delta first. Bug: 1129004 Change-Id: I8ff9fd6a03551d1bdde29d263f76b1f5857ed3be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424192Reviewed-by:Sami Kyöstilä <skyostil@chromium.org> Reviewed-by:
Bo <boliu@chromium.org> Commit-Queue: Bo <boliu@chromium.org> Auto-Submit: Eric Seckler <eseckler@chromium.org> Cr-Commit-Position: refs/heads/master@{#809775}
Showing
Please register or sign in to comment