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

Side by Side Diff: tools/unused-symbols-report.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « tools/traceline/traceline/scripts/syscalls.py ('k') | tools/valgrind/asan/asan_test.py » ('j') | 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/python 1 #!/usr/bin/env python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 """Print a report of symbols stripped by the linker due to being unused. 6 """Prints a report of symbols stripped by the linker due to being unused.
7 7
8 To use, build with these linker flags: 8 To use, build with these linker flags:
9 -Wl,--gc-sections 9 -Wl,--gc-sections
10 -Wl,--print-gc-sections 10 -Wl,--print-gc-sections
11 the first one is the default in Release; search build/common.gypi for it 11 the first one is the default in Release; search build/common.gypi for it
12 and to see where to add the other. 12 and to see where to add the other.
13 13
14 Then build, saving the output into a file: 14 Then build, saving the output into a file:
15 make chrome 2>&1 | tee buildlog 15 make chrome 2>&1 | tee buildlog
16 and run this script on it: 16 and run this script on it:
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 if len(args) < 1: 160 if len(args) < 1:
161 parser.print_help() 161 parser.print_help()
162 sys.exit(1) 162 sys.exit(1)
163 163
164 iter = Parse(open(args[0]), 164 iter = Parse(open(args[0]),
165 skip_paths=opts.skip_paths, 165 skip_paths=opts.skip_paths,
166 only_paths=opts.only_paths) 166 only_paths=opts.only_paths)
167 Output(iter) 167 Output(iter)
168 168
169
169 if __name__ == '__main__': 170 if __name__ == '__main__':
170 main() 171 main()
OLDNEW
« no previous file with comments | « tools/traceline/traceline/scripts/syscalls.py ('k') | tools/valgrind/asan/asan_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698