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

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

Issue 2778963003: Revert of V2 of //tools/binary_size rewrite (diffs). (Closed)
Patch Set: 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 # map2size.py 1 # analyze.py
2 2
3 Parses a linker .map(.gz) file and outputs the result as a .size(.gz) file. 3 Parses and processes a linker .map file and outputs the result as a .size 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/analyze.py out/Release/lib.unstripped/libchrome.so.map.gz --output 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/map2size.py out/Release/chrome.map.gz chrome.size -v 14 tools/binary_size/analyze.py out/Release/chrome.map.gz --output 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 # console.py 25 # query.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 # Runs a single diff and exits (does not enter interactive mode). 31 # Run a single query and exit rather than entering 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/query.py chrome.size --query 'all_syms.WhereBiggerThan(100 0)'
33 33
34 # Enters a Python REPL (it will print more guidance). 34 # Enters a Python REPL:
35 tools/binary_size/console.py chrome.size 35 tools/binary_size/query.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). 41 1. Convert explain_binary_size_delta.py to use new data model.
42 * Store only mangled names. 42 1. More query.py features:
43 * Save space by clustering by path (in addition to section_name).
44 1. More console.py features:
45 * Template Symbols - shows when templates lead to code bloat. 43 * Template Symbols - shows when templates lead to code bloat.
46 * Duplicate Symbols - shows when statics in headers are an issue. 44 * Duplicate Symbols - shows when statics in headers are an issue.
47 * Overloaded Symbols - shows when overloads are excessive. 45 * Overloaded Symbols - shows when overloads are excessive.
48 * Per-class / namespace size (no way to distinguish class vs namespace). 46 * Per-class / namespace size (no way to distinguish class vs namespace).
49 * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes). 47 * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes).
50 * CSV output (for pasting into a spreadsheet). 48 * An interactive UI (either drop into python or use a web server).
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). 50 * Convert paths from .o path to .cc path (better breakdowns).
53 * Via "ninja -t commands libchrome.so" (3 seconds on my machine). 51 * Break down by query.py groupings (use query.py to define GroupBy()s,
54 * Break down by other groupings (e.g. create from nested `SymbolGroups`) 52 then render to html graph)
55 1. More `map2size.py` features: 53 1. More analysis.py features:
56 * Find out more about 0xffffffffffffffff addresses, and why such large 54 * Find out more about 0xffffffffffffffff addresses, and why such large
57 gaps exist after them. 55 gaps exist after them.
58 * Use nm to get the full list of symbols that share the same address. 56 * 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 57 1. Integrate with `resource_sizes.py` so that it tracks size of major
60 components separately: chrome vs blink vs skia vs v8. 58 components separately: chrome vs blink vs skia vs v8.
61 1. Speed up some steps (like normalizing names) via multiprocessing. 59 1. Speed up some steps (like normalizing names) via multiprocessing.
62 1. Use resource whitelist information to attribute .pak file size to .o files. 60 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