Parses a linker .map(.gz) file and outputs the result as a .size(.gz) file.
# Android: gn gen out/Release --args='target_os="android" is_official_build=true' ninja -C out/Release -j 1000 libchrome.so tools/binary_size/map2size.py out/Release/lib.unstripped/libchrome.so.map.gz chrome.size -v # Linux: gn gen out/Release --args='is_official_build=true' ninja -C out/Release -j 1000 chrome tools/binary_size/map2size.py out/Release/chrome.map.gz chrome.size -v
Creates an interactive size breakdown as a stand-alone html report.
tools/binary_size/create_html_breakdown.py chrome.size --report-dir size-report -v xdg-open size-report/index.html
Starts a Python interpreter where you can run custom queries.
# Runs a single diff and exits (does not enter interactive mode). tools/binary_size/console.py without_patch.size with_patch.size --query='Diff(size_info2, size_info1)' # Enters a Python REPL (it will print more guidance). tools/binary_size/console.py chrome.size
Tracked in https://crbug.com/681694
SymbolGroups
)map2size.py
features:resource_sizes.py
so that it tracks size of major components separately: chrome vs blink vs skia vs v8.