Chromium Code Reviews| Index: tools/linux/dump-static-initializers.py |
| diff --git a/tools/linux/dump-static-initializers.py b/tools/linux/dump-static-initializers.py |
| index 61261cb8b133e52669b674013c2ac5c8c64700e1..ede5489703c252fa741e4a7be9df1df6a3af9365 100755 |
| --- a/tools/linux/dump-static-initializers.py |
| +++ b/tools/linux/dump-static-initializers.py |
| @@ -147,7 +147,7 @@ def main(): |
| parser.add_option('-d', '--diffable', dest='diffable', |
| action='store_true', default=False, |
| help='Prints the filename on each line, for more easily ' |
| - 'diff-able output.') |
| + 'diff-able output. (Used by sizes.py)') |
| opts, args = parser.parse_args() |
| if len(args) != 1: |
| parser.error('missing filename argument') |
| @@ -183,14 +183,18 @@ def main(): |
| ref_output.append(' ' + ref) |
| if opts.diffable: |
| - print '\n'.join(qualified_filename + r for r in ref_output) |
| + print '\n'.join('# ' + qualified_filename + r for r in ref_output) |
| else: |
| print '%s (initializer offset 0x%x size 0x%x)' % (qualified_filename, |
| addr, size) |
| print '\n'.join(ref_output) + '\n' |
|
Nico
2012/02/07 05:53:19
Just
if opts.diffable:
print '#',
print '
|
| - print 'Found %d static initializers in %d files.' % (initializer_count, |
| - file_count) |
| + last_line = 'Found %d static initializers in %d files.' % (initializer_count, |
| + file_count) |
| + if opts.diffable: |
| + print '# ' + last_line |
| + else: |
| + print last_line |
| return 0 |