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

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

Issue 2866103003: supersize: Fix --tool-prefix autodetection (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/binary_size/libsupersize/console.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/binary_size/libsupersize/archive.py
diff --git a/tools/binary_size/libsupersize/archive.py b/tools/binary_size/libsupersize/archive.py
index 8fa685b732bce08ca60ae4d981b50114ef3a3752..0559adc5fc341673373d0fdf9bca01e05ded6078 100644
--- a/tools/binary_size/libsupersize/archive.py
+++ b/tools/binary_size/libsupersize/archive.py
@@ -323,6 +323,11 @@ def _AddSymbolAliases(raw_symbols, aliases_by_address):
replacements.append((i, name_list))
num_new_symbols += len(name_list) - 1
+ if float(num_new_symbols) / len(raw_symbols) < .1:
+ logging.warning('Number of aliases is oddly low (%.0f%%). It should '
+ 'usually be around 25%%. Ensure --tool-prefix is correct.',
+ float(num_new_symbols) / len(raw_symbols) * 100)
+
# Step 2: Create new symbols as siblings to each existing one.
logging.debug('Creating %d aliases', num_new_symbols)
src_cursor_end = len(raw_symbols)
@@ -601,8 +606,8 @@ def AddArguments(parser):
parser.add_argument('--no-source-paths', action='store_true',
help='Do not use .ninja files to map '
'object_path -> source_path')
- parser.add_argument('--tool-prefix', default='',
- help='Path prefix for c++filt.')
+ parser.add_argument('--tool-prefix',
+ help='Path prefix for c++filt, nm, readelf.')
parser.add_argument('--output-directory',
help='Path to the root build directory.')
« no previous file with comments | « no previous file | tools/binary_size/libsupersize/console.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698