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', |
Mark Mentovai
2013/12/13 23:03:20
Sort. This belongs…
tfarina
2013/12/16 02:42:03
Done.
| |
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 'third_party/WebKit/Source/core/svg/graphics', | 107 'third_party/WebKit/Source/core/svg/graphics', |
108 'third_party/WebKit/Source/core/svg/graphics/filters', | 108 'third_party/WebKit/Source/core/svg/graphics/filters', |
109 'third_party/WebKit/Source/core/svg/properties', | 109 'third_party/WebKit/Source/core/svg/properties', |
110 'third_party/WebKit/Source/core/webaudio', | 110 'third_party/WebKit/Source/core/webaudio', |
111 'third_party/WebKit/Source/core/websockets', | 111 'third_party/WebKit/Source/core/websockets', |
112 'third_party/WebKit/Source/core/workers', | 112 'third_party/WebKit/Source/core/workers', |
113 'third_party/WebKit/Source/core/xml', | 113 'third_party/WebKit/Source/core/xml', |
114 'third_party/WebKit/Source/public', | 114 'third_party/WebKit/Source/public', |
115 'third_party/WebKit/Source/web', | 115 'third_party/WebKit/Source/web', |
116 'third_party/cld', | 116 'third_party/cld', |
117 'third_party/icu/public/common', | 117 'third_party/icu/public/common', |
Mark Mentovai
2013/12/13 23:03:20
…down here now.
tfarina
2013/12/16 02:42:03
Done.
| |
118 'third_party/icu/public/i18n', | 118 'third_party/icu/public/i18n', |
119 'third_party/npapi', | 119 'third_party/npapi', |
120 'third_party/npapi/bindings', | 120 'third_party/npapi/bindings', |
121 'third_party/protobuf', | 121 'third_party/protobuf', |
122 'third_party/protobuf/src', | 122 'third_party/protobuf/src', |
123 'third_party/skia/gpu/include', | 123 'third_party/skia/gpu/include', |
124 'third_party/skia/include/config', | 124 'third_party/skia/include/config', |
125 'third_party/skia/include/core', | 125 'third_party/skia/include/core', |
126 'third_party/skia/include/effects', | 126 'third_party/skia/include/effects', |
127 'third_party/skia/include/gpu', | 127 'third_party/skia/include/gpu', |
(...skipping 65 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 |