OLD | NEW |
1 # Tools for analyzing Chrome's binary size | 1 # Tools for analyzing Chrome's binary size |
2 | 2 |
3 # Super Size | 3 # Super Size |
4 | 4 |
5 Collect, archive, and analyze Chrome's binary size. | 5 Collect, archive, and analyze Chrome's binary size. |
6 | 6 |
7 ## "archive" | 7 ## "archive" |
8 | 8 |
9 Collect size information and dump it into a `.size` file. Mainly consists of | 9 Collect size information and dump it into a `.size` file. Mainly consists of |
10 symbol information parsed from a linker .map file. | 10 symbol information parsed from a linker .map file. |
(...skipping 15 matching lines...) Expand all Loading... |
26 # Non-Googlers: | 26 # Non-Googlers: |
27 gn gen out/Release --args='is_official_build=true symbol_level=1 exclude_unw
ind_tables=true ffmpeg_branding="Chrome" proprietary_codecs=true' | 27 gn gen out/Release --args='is_official_build=true symbol_level=1 exclude_unw
ind_tables=true ffmpeg_branding="Chrome" proprietary_codecs=true' |
28 ninja -C out/Release -j 1000 chrome | 28 ninja -C out/Release -j 1000 chrome |
29 tools/binary_size/supersize archive chrome.size --elf-file out/Release/chrom
e -v | 29 tools/binary_size/supersize archive chrome.size --elf-file out/Release/chrom
e -v |
30 | 30 |
31 ## "html_report" | 31 ## "html_report" |
32 | 32 |
33 Creates an interactive size breakdown (by source path) as a stand-alone html | 33 Creates an interactive size breakdown (by source path) as a stand-alone html |
34 report. | 34 report. |
35 | 35 |
36 ## Example Usage: | 36 ### Example Usage: |
37 | 37 |
38 tools/binary_size/supersize html_report chrome.size --report-dir size-report
-v | 38 tools/binary_size/supersize html_report chrome.size --report-dir size-report
-v |
39 xdg-open size-report/index.html | 39 xdg-open size-report/index.html |
40 | 40 |
41 ## "console" | 41 ## "console" |
42 | 42 |
43 Starts a Python interpreter where you can run custom queries. | 43 Starts a Python interpreter where you can run custom queries. |
44 | 44 |
45 ## Example Usage: | 45 ### Example Usage: |
46 | 46 |
47 # Runs a single diff and exits (does not enter interactive mode). | 47 # Prints size infomation and exits (does not enter interactive mode). |
48 tools/binary_size/supersize console without_patch.size with_patch.size --que
ry='Diff(size_info2, size_info1)' | 48 tools/binary_size/supersize console chrome.size --query='Print(size_info)' |
49 | 49 |
50 # Enters a Python REPL (it will print more guidance). | 50 # Enters a Python REPL (it will print more guidance). |
51 tools/binary_size/supersize console chrome.size | 51 tools/binary_size/supersize console chrome.size |
52 | 52 |
53 ## diagnose_apk_bloat.py | 53 ## "diff" |
| 54 |
| 55 A convenience command equivalent to: `console before.size after.size --query='Pr
int(Diff(size_info1, size_info2))'` |
| 56 |
| 57 ### Example Usage: |
| 58 |
| 59 tools/binary_size/supersize diff before.size after.size --all |
| 60 |
| 61 # diagnose_apk_bloat.py |
54 | 62 |
55 Determine the cause of binary size bloat for a patch. | 63 Determine the cause of binary size bloat for a patch. |
56 | 64 |
57 ### Example Usage: | 65 ## Example Usage: |
58 | 66 |
59 # Sync, build, and diff for HEAD and HEAD^. | 67 # Sync, build, and diff for HEAD and HEAD^. |
60 tools/binary_size/diagnose_apk_bloat.py | 68 tools/binary_size/diagnose_apk_bloat.py |
61 | 69 |
62 # Display detailed usage info (there are many options). | 70 # Display detailed usage info (there are many options). |
63 tools/binary_size/diagnose_apk_bloat.py -h | 71 tools/binary_size/diagnose_apk_bloat.py -h |
64 | 72 |
65 # Roadmap for Super Size: | 73 # Roadmap for Super Size: |
66 | 74 |
67 Tracked in https://crbug.com/681694 | 75 Tracked in https://crbug.com/681694 |
(...skipping 23 matching lines...) Expand all Loading... |
91 1. Integrate with `resource_sizes.py` so that it tracks size of major | 99 1. Integrate with `resource_sizes.py` so that it tracks size of major |
92 components separately: chrome vs blink vs skia vs v8. | 100 components separately: chrome vs blink vs skia vs v8. |
93 1. Speed up some steps (like normalizing names) via multiprocessing. | 101 1. Speed up some steps (like normalizing names) via multiprocessing. |
94 1. Add dependency graph info, perhaps just on a per-file basis. | 102 1. Add dependency graph info, perhaps just on a per-file basis. |
95 | 103 |
96 # Roadmap for diagnose_apk_bloat.py: | 104 # Roadmap for diagnose_apk_bloat.py: |
97 1. More `diagnose_apk_bloat.py` features: | 105 1. More `diagnose_apk_bloat.py` features: |
98 | 106 |
99 * Add diffing functionality to see diff stats for two commits. | 107 * Add diffing functionality to see diff stats for two commits. |
100 * Add --cloud option for using artifacts from perf builders. | 108 * Add --cloud option for using artifacts from perf builders. |
OLD | NEW |