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

Unified Diff: tools/linux/dump-static-initializers.py

Issue 9347013: Adds '#'s to the beginning of each output line when running with -d (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« 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