| OLD | NEW |
| 1 # map2size.py | 1 # map2size.py |
| 2 | 2 |
| 3 Parses a linker .map(.gz) file and outputs the result as a .size(.gz) file. | 3 Parses a linker .map(.gz) file and outputs the result as a .size(.gz) file. |
| 4 | 4 |
| 5 ## Example Usage: | 5 ## Example Usage: |
| 6 | 6 |
| 7 # Android: | 7 # Android: |
| 8 gn gen out/Release --args='target_os="android" is_official_build=true' | 8 gn gen out/Release --args='target_os="android" is_official_build=true' |
| 9 ninja -C out/Release -j 1000 libchrome.so | 9 ninja -C out/Release -j 1000 libchrome.so |
| 10 tools/binary_size/map2size.py out/Release/lib.unstripped/libchrome.so.map.gz
chrome.size -v | 10 tools/binary_size/map2size.py out/Release/lib.unstripped/libchrome.so.map.gz
chrome.size -v |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 # Runs a single diff and exits (does not enter interactive mode). | 31 # Runs a single diff and exits (does not enter interactive mode). |
| 32 tools/binary_size/console.py without_patch.size with_patch.size --query='Dif
f(size_info2, size_info1)' | 32 tools/binary_size/console.py without_patch.size with_patch.size --query='Dif
f(size_info2, size_info1)' |
| 33 | 33 |
| 34 # Enters a Python REPL (it will print more guidance). | 34 # Enters a Python REPL (it will print more guidance). |
| 35 tools/binary_size/console.py chrome.size | 35 tools/binary_size/console.py chrome.size |
| 36 | 36 |
| 37 # Roadmap: | 37 # Roadmap: |
| 38 | 38 |
| 39 Tracked in https://crbug.com/681694 | 39 Tracked in https://crbug.com/681694 |
| 40 | 40 |
| 41 1. Better serialization format (finalize it before people start to use it). | |
| 42 * Store only mangled names. | |
| 43 * Save space by clustering by path (in addition to section_name). | |
| 44 1. More console.py features: | 41 1. More console.py features: |
| 45 * Template Symbols - shows when templates lead to code bloat. | 42 * Template Symbols - shows when templates lead to code bloat. |
| 46 * Duplicate Symbols - shows when statics in headers are an issue. | 43 * Duplicate Symbols - shows when statics in headers are an issue. |
| 47 * Overloaded Symbols - shows when overloads are excessive. | 44 * Overloaded Symbols - shows when overloads are excessive. |
| 48 * Per-class / namespace size (no way to distinguish class vs namespace). | 45 * Per-class / namespace size (no way to distinguish class vs namespace). |
| 49 * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes). | 46 * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes). |
| 50 * CSV output (for pasting into a spreadsheet). | 47 * CSV output (for pasting into a spreadsheet). |
| 48 * Allow Print() to not sort. |
| 51 1. More create_html_breakdown.py features: | 49 1. More create_html_breakdown.py features: |
| 52 * Convert paths from .o path to .cc path (better breakdowns). | |
| 53 * Via "ninja -t commands libchrome.so" (3 seconds on my machine). | |
| 54 * Break down by other groupings (e.g. create from nested `SymbolGroups`) | 50 * Break down by other groupings (e.g. create from nested `SymbolGroups`) |
| 55 1. More `map2size.py` features: | 51 1. More `map2size.py` features: |
| 56 * Find out more about 0xffffffffffffffff addresses, and why such large | 52 * Find out more about 0xffffffffffffffff addresses, and why such large |
| 57 gaps exist after them. | 53 gaps exist after them. |
| 58 * Use nm to get the full list of symbols that share the same address. | 54 * Use nm to get the full list of symbols that share the same address. |
| 59 1. Integrate with `resource_sizes.py` so that it tracks size of major | 55 1. Integrate with `resource_sizes.py` so that it tracks size of major |
| 60 components separately: chrome vs blink vs skia vs v8. | 56 components separately: chrome vs blink vs skia vs v8. |
| 61 1. Speed up some steps (like normalizing names) via multiprocessing. | 57 1. Speed up some steps (like normalizing names) via multiprocessing. |
| 62 1. Use resource whitelist information to attribute .pak file size to .o files. | 58 1. Use resource whitelist information to attribute .pak file size to .o files. |
| 59 1. Add dependency graph info, perhaps just on a per-file basis. |
| OLD | NEW |