OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 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 # based on an almost identical script by: jyrki@google.com (Jyrki Alakuijala) | 5 # based on an almost identical script by: jyrki@google.com (Jyrki Alakuijala) |
6 | 6 |
7 """Prints out include dependencies in chrome. | 7 """Prints out include dependencies in chrome. |
8 | 8 |
9 Since it ignores defines, it gives just a rough estimation of file size. | 9 Since it ignores defines, it gives just a rough estimation of file size. |
10 | 10 |
11 Usage: | 11 Usage: |
12 tools/include_tracer.py chrome/browser/ui/browser.h | 12 tools/include_tracer.py chrome/browser/ui/browser.h |
13 """ | 13 """ |
14 | 14 |
15 import os | 15 import os |
16 import sys | 16 import sys |
17 | 17 |
18 # Created by copying the command line for prerender_browsertest.cc, replacing | 18 # Created by copying the command line for prerender_browsertest.cc, replacing |
19 # spaces with newlines, and dropping everything except -F and -I switches. | 19 # spaces with newlines, and dropping everything except -F and -I switches. |
20 # TODO(port): Add windows, linux directories. | 20 # TODO(port): Add windows, linux directories. |
21 INCLUDE_PATHS = [ | 21 INCLUDE_PATHS = [ |
22 '', | 22 '', |
23 'gpu', | 23 'gpu', |
24 'skia/config', | 24 'skia/config', |
25 'skia/ext', | 25 'skia/ext', |
26 'testing/gmock/include', | 26 'testing/gmock/include', |
27 'testing/gtest/include', | 27 'testing/gtest/include', |
28 'third_party/GTM', | 28 'third_party/google_toolbox_for_mac/src', |
29 'third_party/WebKit/Source', | 29 'third_party/WebKit/Source', |
30 'third_party/WebKit/Source/wtf', | 30 'third_party/WebKit/Source/wtf', |
31 'third_party/WebKit/Source/core', | 31 'third_party/WebKit/Source/core', |
32 'third_party/WebKit/Source/core/accessibility', | 32 'third_party/WebKit/Source/core/accessibility', |
33 'third_party/WebKit/Source/core/accessibility/chromium', | 33 'third_party/WebKit/Source/core/accessibility/chromium', |
34 'third_party/WebKit/Source/core/bindings', | 34 'third_party/WebKit/Source/core/bindings', |
35 'third_party/WebKit/Source/core/bindings/generic', | 35 'third_party/WebKit/Source/core/bindings/generic', |
36 'third_party/WebKit/Source/core/bindings/v8', | 36 'third_party/WebKit/Source/core/bindings/v8', |
37 'third_party/WebKit/Source/core/bindings/v8/custom', | 37 'third_party/WebKit/Source/core/bindings/v8/custom', |
38 'third_party/WebKit/Source/core/bindings/v8/specialization', | 38 'third_party/WebKit/Source/core/bindings/v8/specialization', |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 | 194 |
195 def main(): | 195 def main(): |
196 bytes = Walk(set(), sys.argv[1], '', 0) | 196 bytes = Walk(set(), sys.argv[1], '', 0) |
197 print | 197 print |
198 print float(bytes) / (1 << 20), "megabytes of chrome source" | 198 print float(bytes) / (1 << 20), "megabytes of chrome source" |
199 | 199 |
200 | 200 |
201 if __name__ == '__main__': | 201 if __name__ == '__main__': |
202 sys.exit(main()) | 202 sys.exit(main()) |
OLD | NEW |