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

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

Issue 2936033002: Supersize diff rewrite + tweaks (Closed)
Patch Set: review comnts Created 3 years, 6 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 7be9b341ebf4f1dcb723f9ffd41d7665551bff6d..223fe24207c06fad5c9aefe2a88cd9105815b607 100644
--- a/tools/binary_size/libsupersize/file_format.py
+++ b/tools/binary_size/libsupersize/file_format.py
@@ -93,7 +93,7 @@ def _SaveSizeInfoToFile(size_info, file_obj):
_LogSize(file_obj, 'names (final)') # For libchrome: adds 3.5mb.
-def _LoadSizeInfoFromFile(file_obj):
+def _LoadSizeInfoFromFile(file_obj, size_path):
"""Loads a size_info from the given file."""
lines = iter(file_obj)
next(lines) # Comment line.
@@ -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, raw_symbols, metadata=metadata,
+ size_path=size_path)
def SaveSizeInfo(size_info, path):
@@ -203,4 +204,4 @@ def SaveSizeInfo(size_info, path):
def LoadSizeInfo(path):
"""Returns a SizeInfo loaded from |path|."""
with gzip.open(path) as f:
- return _LoadSizeInfoFromFile(f)
+ return _LoadSizeInfoFromFile(f, 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