| Index: tools/binary_size/README.md
|
| diff --git a/tools/binary_size/README.md b/tools/binary_size/README.md
|
| index 54ddf40600e220709b9091d20d48d5283575a38e..4bc66ea6d138a426a9fce29a9bc6ae2d4b17b025 100644
|
| --- a/tools/binary_size/README.md
|
| +++ b/tools/binary_size/README.md
|
| @@ -1,44 +1,52 @@
|
| -# map2size.py
|
| +# Tools for analyzing Chrome's binary size
|
|
|
| -Parses a linker .map file and outputs the result as a .size file.
|
| +# Super Size
|
|
|
| -## Example Usage:
|
| +Collect, archive, and analyze Chrome's binary size.
|
| +
|
| +## "archive"
|
| +
|
| +Collect size information and dump it into a `.size` file. Mainly consists of
|
| +symbol information parsed from a linker .map file.
|
| +
|
| +### Example Usage:
|
|
|
| # 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 chrome.size -v
|
| + tools/binary_size/supersize archive chrome.size --elf-file out/Release/lib.unstripped/libchrome.so -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 chrome.size -v
|
| + tools/binary_size/supersize archive chrome.size --elf-file out/Release/chrome -v
|
|
|
| -# create_html_breakdown.py
|
| +## "html_report"
|
|
|
| -Creates an interactive size breakdown as a stand-alone html report.
|
| +Creates an interactive size breakdown (by source path) as a stand-alone html
|
| +report.
|
|
|
| ## Example Usage:
|
|
|
| - tools/binary_size/create_html_breakdown.py chrome.size --report-dir size-report -v
|
| + tools/binary_size/supersize html_report chrome.size --report-dir size-report -v
|
| xdg-open size-report/index.html
|
|
|
| -# console.py
|
| +## "console"
|
|
|
| Starts a Python interpreter where you can run custom queries.
|
|
|
| ## Example Usage:
|
|
|
| # 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)'
|
| + tools/binary_size/supersize console 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
|
| + tools/binary_size/supersize console chrome.size
|
|
|
| -# diagnose_apk_bloat.py
|
| +## diagnose_apk_bloat.py
|
|
|
| Determine the cause of binary size bloat for a patch.
|
|
|
| -## Example Usage:
|
| +### Example Usage:
|
|
|
| # Sync, build, and store MonochromePublic.apk for HEAD and HEAD^.
|
| tools/binary_size/diagnose_apk_bloat.py -v
|
| @@ -46,28 +54,39 @@ Determine the cause of binary size bloat for a patch.
|
| # Display detailed usage info (there are many options).
|
| tools/binary_size/diagnose_apk_bloat.py -h
|
|
|
| -# Roadmap:
|
| -
|
| - Tracked in https://crbug.com/681694
|
| -
|
| - 1. More console.py features:
|
| - * Template Symbols - shows when templates lead to code bloat.
|
| - * Duplicate Symbols - shows when statics in headers are an issue.
|
| - * Overloaded Symbols - shows when overloads are excessive.
|
| - * Per-class / namespace size (no way to distinguish class vs namespace).
|
| - * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes).
|
| - * CSV output (for pasting into a spreadsheet).
|
| - 1. More create_html_breakdown.py features:
|
| - * Break down by other groupings (e.g. create from nested `SymbolGroups`)
|
| - 1. More `map2size.py` features:
|
| - * Find out more about 0xffffffffffffffff addresses, and why such large
|
| - gaps exist after them.
|
| - * Use nm to get the full list of symbols that share the same address.
|
| - 1. More diagnose_apk_bloat.py features:
|
| - * Add diffing functionality to see diff stats for two commits.
|
| - * Add --cloud option for using artifacts from perf builders.
|
| - 1. Integrate with `resource_sizes.py` so that it tracks size of major
|
| - components separately: chrome vs blink vs skia vs v8.
|
| - 1. Speed up some steps (like normalizing names) via multiprocessing.
|
| - 1. Use resource whitelist information to attribute .pak file size to .o files.
|
| - 1. Add dependency graph info, perhaps just on a per-file basis.
|
| +# Roadmap for Super Size:
|
| +
|
| +Tracked in https://crbug.com/681694
|
| +
|
| +1. More `archive` features:
|
| +
|
| + * Find out more about 0xffffffffffffffff addresses, and why such large
|
| + gaps exist after them.
|
| + * Use nm to get the full list of symbols that share the same address.
|
| + * Collect java symbol information
|
| + * Collect .pak file information (using .o.whitelist files)
|
| + * Collect .apk entry information
|
| +
|
| +1. More `console` features:
|
| +
|
| + * Template Symbols - shows when templates lead to code bloat.
|
| + * Duplicate Symbols - shows when statics in headers are an issue.
|
| + * Overloaded Symbols - shows when overloads are excessive.
|
| + * Per-class / namespace size (no way to distinguish class vs namespace).
|
| + * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes).
|
| + * CSV output (for pasting into a spreadsheet).
|
| +
|
| +1. More `html_report` features:
|
| +
|
| + * Break down by other groupings (e.g. create from nested `SymbolGroups`)
|
| +
|
| +1. Integrate with `resource_sizes.py` so that it tracks size of major
|
| + components separately: chrome vs blink vs skia vs v8.
|
| +1. Speed up some steps (like normalizing names) via multiprocessing.
|
| +1. Add dependency graph info, perhaps just on a per-file basis.
|
| +
|
| +# Roadmap for diagnose_apk_bloat.py:
|
| +1. More `diagnose_apk_bloat.py` features:
|
| +
|
| + * Add diffing functionality to see diff stats for two commits.
|
| + * Add --cloud option for using artifacts from perf builders.
|
|
|