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

Unified Diff: tools/binary_size/libsupersize/file_format.py

Issue 2854173003: supersize: Don't cluster by default. Make Diff() accept only SizeInfo. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/binary_size/libsupersize/diff.py ('k') | tools/binary_size/libsupersize/integration_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/binary_size/libsupersize/file_format.py
diff --git a/tools/binary_size/libsupersize/file_format.py b/tools/binary_size/libsupersize/file_format.py
index 867d29c5e063030a817baa5eabe231381ff8286a..e58494daacc7e557bc587308824dce87fa82fcf5 100644
--- a/tools/binary_size/libsupersize/file_format.py
+++ b/tools/binary_size/libsupersize/file_format.py
@@ -45,7 +45,7 @@ def _SaveSizeInfoToFile(size_info, file_obj):
# Store a single copy of all paths and have them referenced by index.
# Using an OrderedDict makes the indices more repetitive (better compression).
path_tuples = collections.OrderedDict.fromkeys(
- (s.object_path, s.source_path) for s in size_info.raw_symbols)
+ (s.object_path, s.source_path) for s in size_info.symbols)
for i, key in enumerate(path_tuples):
path_tuples[key] = i
file_obj.write('%d\n' % len(path_tuples))
@@ -53,7 +53,7 @@ def _SaveSizeInfoToFile(size_info, file_obj):
_LogSize(file_obj, 'paths') # For libchrome, adds 200kb.
# Symbol counts by section.
- by_section = models.SymbolGroup(size_info.raw_symbols)
+ by_section = models.SymbolGroup(size_info.symbols)
by_section = by_section.GroupBySectionName().SortedByName()
file_obj.write('%s\n' % '\t'.join(g.name for g in by_section))
file_obj.write('%s\n' % '\t'.join(str(len(g)) for g in by_section))
@@ -181,7 +181,8 @@ def _LoadSizeInfoFromFile(file_obj):
raw_symbols[symbol_idx] = new_sym
symbol_idx += 1
- return models.SizeInfo(section_sizes, raw_symbols, metadata=metadata)
+ return models.SizeInfo(section_sizes, models.SymbolGroup(raw_symbols),
+ metadata=metadata)
def SaveSizeInfo(size_info, path):
« no previous file with comments | « tools/binary_size/libsupersize/diff.py ('k') | tools/binary_size/libsupersize/integration_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698