Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: tools/binary_size/README.md

Issue 2785483002: Reland of V2 of //tools/binary_size rewrite (diffs). (Closed)
Patch Set: add missing name= Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/binary_size/analyze.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # analyze.py 1 # map2size.py
2 2
3 Parses and processes a linker .map file and outputs the result as a .size 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/analyze.py out/Release/lib.unstripped/libchrome.so.map.gz --output chrome.size -v 10 tools/binary_size/map2size.py out/Release/lib.unstripped/libchrome.so.map.gz chrome.size -v
11 # Linux: 11 # Linux:
12 gn gen out/Release --args='is_official_build=true' 12 gn gen out/Release --args='is_official_build=true'
13 ninja -C out/Release -j 1000 chrome 13 ninja -C out/Release -j 1000 chrome
14 tools/binary_size/analyze.py out/Release/chrome.map.gz --output chrome.size -v 14 tools/binary_size/map2size.py out/Release/chrome.map.gz chrome.size -v
15 15
16 # create_html_breakdown.py 16 # create_html_breakdown.py
17 17
18 Creates an interactive size breakdown as a stand-alone html report. 18 Creates an interactive size breakdown as a stand-alone html report.
19 19
20 ## Example Usage: 20 ## Example Usage:
21 21
22 tools/binary_size/create_html_breakdown.py chrome.size --report-dir size-rep ort -v 22 tools/binary_size/create_html_breakdown.py chrome.size --report-dir size-rep ort -v
23 xdg-open size-report/index.html 23 xdg-open size-report/index.html
24 24
25 # query.py 25 # console.py
26 26
27 Starts a Python interpreter where you can run custom queries. 27 Starts a Python interpreter where you can run custom queries.
28 28
29 ## Example Usage: 29 ## Example Usage:
30 30
31 # Run a single query and exit rather than entering interactive mode: 31 # Runs a single diff and exits (does not enter interactive mode).
32 tools/binary_size/query.py chrome.size --query 'all_syms.WhereBiggerThan(100 0)' 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: 34 # Enters a Python REPL (it will print more guidance).
35 tools/binary_size/query.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. Convert explain_binary_size_delta.py to use new data model. 41 1. Better serialization format (finalize it before people start to use it).
42 1. More query.py features: 42 * Store only mangled names.
43 * Save space by clustering by path (in addition to section_name).
44 1. More console.py features:
43 * Template Symbols - shows when templates lead to code bloat. 45 * Template Symbols - shows when templates lead to code bloat.
44 * Duplicate Symbols - shows when statics in headers are an issue. 46 * Duplicate Symbols - shows when statics in headers are an issue.
45 * Overloaded Symbols - shows when overloads are excessive. 47 * Overloaded Symbols - shows when overloads are excessive.
46 * Per-class / namespace size (no way to distinguish class vs namespace). 48 * Per-class / namespace size (no way to distinguish class vs namespace).
47 * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes). 49 * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes).
48 * An interactive UI (either drop into python or use a web server). 50 * CSV output (for pasting into a spreadsheet).
49 1. More create_html_breakdown.py features: 51 1. More create_html_breakdown.py features:
50 * Convert paths from .o path to .cc path (better breakdowns). 52 * Convert paths from .o path to .cc path (better breakdowns).
51 * Break down by query.py groupings (use query.py to define GroupBy()s, 53 * Via "ninja -t commands libchrome.so" (3 seconds on my machine).
52 then render to html graph) 54 * Break down by other groupings (e.g. create from nested `SymbolGroups`)
53 1. More analysis.py features: 55 1. More `map2size.py` features:
54 * Find out more about 0xffffffffffffffff addresses, and why such large 56 * Find out more about 0xffffffffffffffff addresses, and why such large
55 gaps exist after them. 57 gaps exist after them.
56 * Use nm to get the full list of symbols that share the same address. 58 * Use nm to get the full list of symbols that share the same address.
57 1. Integrate with `resource_sizes.py` so that it tracks size of major 59 1. Integrate with `resource_sizes.py` so that it tracks size of major
58 components separately: chrome vs blink vs skia vs v8. 60 components separately: chrome vs blink vs skia vs v8.
59 1. Speed up some steps (like normalizing names) via multiprocessing. 61 1. Speed up some steps (like normalizing names) via multiprocessing.
60 1. Use resource whitelist information to attribute .pak file size to .o files. 62 1. Use resource whitelist information to attribute .pak file size to .o files.
OLDNEW
« no previous file with comments | « no previous file | tools/binary_size/analyze.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698