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

Side by Side Diff: tools/binary_size/run_binary_size_analysis.py

Issue 573273002: Binary Size tool: Check DWARF format only when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Generate a spatial analysis against an arbitrary library. 6 """Generate a spatial analysis against an arbitrary library.
7 7
8 To use, build the 'binary_size_tool' target. Then run this tool, passing 8 To use, build the 'binary_size_tool' target. Then run this tool, passing
9 in the location of the library to be analyzed along with any other options 9 in the location of the library to be analyzed along with any other options
10 you desire. 10 you desire.
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 nm_binary = _find_in_system_path('nm') 863 nm_binary = _find_in_system_path('nm')
864 assert nm_binary, 'Unable to find nm in the path. Use --nm-binary '\ 864 assert nm_binary, 'Unable to find nm in the path. Use --nm-binary '\
865 'to specify location.' 865 'to specify location.'
866 866
867 if opts.pak: 867 if opts.pak:
868 assert os.path.isfile(opts.pak), 'Could not find ' % opts.pak 868 assert os.path.isfile(opts.pak), 'Could not find ' % opts.pak
869 869
870 print('addr2line: %s' % addr2line_binary) 870 print('addr2line: %s' % addr2line_binary)
871 print('nm: %s' % nm_binary) 871 print('nm: %s' % nm_binary)
872 872
873 CheckDebugFormatSupport(opts.library, addr2line_binary) 873 if opts.library:
874 CheckDebugFormatSupport(opts.library, addr2line_binary)
874 875
875 symbols = GetNmSymbols(opts.nm_in, opts.nm_out, opts.library, 876 symbols = GetNmSymbols(opts.nm_in, opts.nm_out, opts.library,
876 opts.jobs, opts.verbose is True, 877 opts.jobs, opts.verbose is True,
877 addr2line_binary, nm_binary, 878 addr2line_binary, nm_binary,
878 opts.disable_disambiguation is None, 879 opts.disable_disambiguation is None,
879 opts.source_path) 880 opts.source_path)
880 881
881 if opts.pak: 882 if opts.pak:
882 AddPakData(symbols, opts.pak) 883 AddPakData(symbols, opts.pak)
883 884
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 shutil.copy(os.path.join(d3_src, 'LICENSE'), d3_out) 923 shutil.copy(os.path.join(d3_src, 'LICENSE'), d3_out)
923 shutil.copy(os.path.join(d3_src, 'd3.js'), d3_out) 924 shutil.copy(os.path.join(d3_src, 'd3.js'), d3_out)
924 shutil.copy(os.path.join(template_src, 'index.html'), opts.destdir) 925 shutil.copy(os.path.join(template_src, 'index.html'), opts.destdir)
925 shutil.copy(os.path.join(template_src, 'D3SymbolTreeMap.js'), opts.destdir) 926 shutil.copy(os.path.join(template_src, 'D3SymbolTreeMap.js'), opts.destdir)
926 927
927 print 'Report saved to ' + opts.destdir + '/index.html' 928 print 'Report saved to ' + opts.destdir + '/index.html'
928 929
929 930
930 if __name__ == '__main__': 931 if __name__ == '__main__':
931 sys.exit(main()) 932 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698