OLD | NEW |
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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 'the specified path. Mutually exclusive with --nm-in.') | 625 'the specified path. Mutually exclusive with --nm-in.') |
626 parser.add_option('--nm-binary', | 626 parser.add_option('--nm-binary', |
627 help='use the specified nm binary to analyze library. ' | 627 help='use the specified nm binary to analyze library. ' |
628 'This is to be used when the nm in the path is not for ' | 628 'This is to be used when the nm in the path is not for ' |
629 'the right architecture or of the right version.') | 629 'the right architecture or of the right version.') |
630 parser.add_option('--addr2line-binary', | 630 parser.add_option('--addr2line-binary', |
631 help='use the specified addr2line binary to analyze ' | 631 help='use the specified addr2line binary to analyze ' |
632 'library. This is to be used when the addr2line in ' | 632 'library. This is to be used when the addr2line in ' |
633 'the path is not for the right architecture or ' | 633 'the path is not for the right architecture or ' |
634 'of the right version.') | 634 'of the right version.') |
635 parser.add_option('--jobs', | 635 parser.add_option('--jobs', type='int', |
636 help='number of jobs to use for the parallel ' | 636 help='number of jobs to use for the parallel ' |
637 'addr2line processing pool; defaults to 1. More ' | 637 'addr2line processing pool; defaults to 1. More ' |
638 'jobs greatly improve throughput but eat RAM like ' | 638 'jobs greatly improve throughput but eat RAM like ' |
639 'popcorn, and take several gigabytes each. Start low ' | 639 'popcorn, and take several gigabytes each. Start low ' |
640 'and ramp this number up until your machine begins to ' | 640 'and ramp this number up until your machine begins to ' |
641 'struggle with RAM. ' | 641 'struggle with RAM. ' |
642 'This argument is only valid when using --library.') | 642 'This argument is only valid when using --library.') |
643 parser.add_option('-v', dest='verbose', action='store_true', | 643 parser.add_option('-v', dest='verbose', action='store_true', |
644 help='be verbose, printing lots of status information.') | 644 help='be verbose, printing lots of status information.') |
645 parser.add_option('--nm-out', metavar='PATH', | 645 parser.add_option('--nm-out', metavar='PATH', |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 shutil.copy(os.path.join(d3_src, 'LICENSE'), d3_out) | 727 shutil.copy(os.path.join(d3_src, 'LICENSE'), d3_out) |
728 shutil.copy(os.path.join(d3_src, 'd3.js'), d3_out) | 728 shutil.copy(os.path.join(d3_src, 'd3.js'), d3_out) |
729 shutil.copy(os.path.join(template_src, 'index.html'), opts.destdir) | 729 shutil.copy(os.path.join(template_src, 'index.html'), opts.destdir) |
730 shutil.copy(os.path.join(template_src, 'D3SymbolTreeMap.js'), opts.destdir) | 730 shutil.copy(os.path.join(template_src, 'D3SymbolTreeMap.js'), opts.destdir) |
731 | 731 |
732 print 'Report saved to ' + opts.destdir + '/index.html' | 732 print 'Report saved to ' + opts.destdir + '/index.html' |
733 | 733 |
734 | 734 |
735 if __name__ == '__main__': | 735 if __name__ == '__main__': |
736 sys.exit(main()) | 736 sys.exit(main()) |
OLD | NEW |