Commit 44c64471 authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[SuperSize] Round padding values in .sizediff.

When creating symbol diffs, mismatches in alias counts and summing
fractional padding PSS values can lead to DiffSymbols with non-integer
padding values. However, numeric values in .sizediff files should be
integers. This CL implements a simple fix: Round paddings to integer
when creating DiffSymbols. The resulting inaccuracy would be in the
order of bytes, and therefore negligible.

Bug: 1132394
Change-Id: Iba9acb0a94de6890aec01ac6c9ee450fb9d69dd6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432668
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810827}
parent 6c6701e1
......@@ -115,6 +115,8 @@ def _DiffSymbolGroups(containers, before, after):
# Create a DeltaSymbol to represent the zero'd out padding of matched symbols.
for (container_name, section_name), padding in padding_by_segment.items():
# Values need to be integer (crbug.com/1132394).
padding = round(padding)
if padding != 0:
after_sym = models.Symbol(section_name, padding)
after_sym.container = container_from_name[container_name]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment