Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: tools/binary_size/libsupersize/diff.py

Issue 2885073002: supersize: Move [clone] from name -> flags & rewrite Cluster() (Closed)
Patch Set: review comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 """Logic for diffing two SizeInfo objects.""" 4 """Logic for diffing two SizeInfo objects."""
5 5
6 import collections 6 import collections
7 import re 7 import re
8 8
9 import models 9 import models
10 10
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 name="** aggregate padding of diff'ed symbols")) 177 name="** aggregate padding of diff'ed symbols"))
178 return models.SymbolDiff(added, removed, similar) 178 return models.SymbolDiff(added, removed, similar)
179 179
180 180
181 def Diff(before, after): 181 def Diff(before, after):
182 """Diffs two SizeInfo objects. Returns a SizeInfoDiff.""" 182 """Diffs two SizeInfo objects. Returns a SizeInfoDiff."""
183 assert isinstance(before, models.SizeInfo) 183 assert isinstance(before, models.SizeInfo)
184 assert isinstance(after, models.SizeInfo) 184 assert isinstance(after, models.SizeInfo)
185 section_sizes = {k: after.section_sizes[k] - v 185 section_sizes = {k: after.section_sizes[k] - v
186 for k, v in before.section_sizes.iteritems()} 186 for k, v in before.section_sizes.iteritems()}
187 symbol_diff = _DiffSymbolGroups(before.symbols, after.symbols) 187 symbol_diff = _DiffSymbolGroups(before.raw_symbols, after.raw_symbols)
188 return models.SizeInfoDiff(section_sizes, symbol_diff, before.metadata, 188 return models.SizeInfoDiff(section_sizes, symbol_diff, before.metadata,
189 after.metadata) 189 after.metadata)
OLDNEW
« no previous file with comments | « tools/binary_size/libsupersize/describe.py ('k') | tools/binary_size/libsupersize/file_format.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698