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

Side by Side Diff: tools/linux/dump-static-initializers.py

Issue 251873003: linux: In diff mode, also print files with init function that calls 0 initializers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Dump functions called by static intializers in a Linux Release binary. 6 """Dump functions called by static intializers in a Linux Release binary.
7 7
8 Usage example: 8 Usage example:
9 tools/linux/dump-static-intializers.py out/Release/chrome 9 tools/linux/dump-static-intializers.py out/Release/chrome
10 10
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 note = NOTES[ref] 207 note = NOTES[ref]
208 elif ref.endswith('_2eproto()'): 208 elif ref.endswith('_2eproto()'):
209 note = 'protocol compiler bug: crbug.com/105626' 209 note = 'protocol compiler bug: crbug.com/105626'
210 210
211 if note: 211 if note:
212 ref_output.append('%s [%s]' % (ref, note)) 212 ref_output.append('%s [%s]' % (ref, note))
213 else: 213 else:
214 ref_output.append(ref) 214 ref_output.append(ref)
215 215
216 if opts.diffable: 216 if opts.diffable:
217 print '\n'.join('# ' + qualified_filename + ' ' + r for r in ref_output) 217 if ref_output:
218 print '\n'.join('# ' + qualified_filename + ' ' + r for r in ref_output)
219 else:
220 print '# %s: (empty initializer list)' % qualified_filename
218 else: 221 else:
219 print '%s (initializer offset 0x%x size 0x%x)' % (qualified_filename, 222 print '%s (initializer offset 0x%x size 0x%x)' % (qualified_filename,
220 addr, size) 223 addr, size)
221 print ''.join(' %s\n' % r for r in ref_output) 224 print ''.join(' %s\n' % r for r in ref_output)
222 225
223 if opts.diffable: 226 if opts.diffable:
224 print '#', 227 print '#',
225 print 'Found %d static initializers in %d files.' % (initializer_count, 228 print 'Found %d static initializers in %d files.' % (initializer_count,
226 file_count) 229 file_count)
227 230
228 return 0 231 return 0
229 232
230 if '__main__' == __name__: 233 if '__main__' == __name__:
231 sys.exit(main()) 234 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