OLD | NEW |
1 ******************************************************************************** | 1 ******************************************************************************** |
2 Entering interactive Python shell. Quick reference: | 2 Entering interactive Python shell. Quick reference: |
3 | 3 |
4 SizeInfo: Clustered, metadata, raw_symbols, section_sizes, symbols | 4 SizeInfo: Clustered, metadata, raw_symbols, section_sizes, symbols |
5 Symbol: FlagsString, IsBss, IsGeneratedByToolchain, IsGroup, address, aliases, e
nd_address, flags, full_name, generated_source, is_anonymous, name, num_aliases,
object_path, padding, pss, pss_without_padding, section, section_name, size, si
ze_without_padding, source_path, template_name | 5 Symbol: FlagsString, IsBss, IsGeneratedByToolchain, IsGroup, address, aliases, e
nd_address, flags, full_name, generated_source, is_anonymous, name, num_aliases,
object_path, padding, pss, pss_without_padding, section, section_name, size, si
ze_without_padding, source_path, template_name |
6 | 6 |
7 SymbolGroup (extends Symbol): Clustered, CountUniqueSymbols, Filter, GroupedBy,
GroupedByName, GroupedByPath, GroupedBySectionName, Inverted, IterLeafSymbols, I
terUniqueSymbols, Sorted, SortedByAddress, SortedByCount, SortedByName, WhereAdd
ressInRange, WhereBiggerThan, WhereFullNameMatches, WhereGeneratedByToolchain, W
hereHasAnyAttribution, WhereHasPath, WhereInSection, WhereIsTemplate, WhereMatch
es, WhereNameMatches, WhereObjectPathMatches, WherePathMatches, WhereSourceIsGen
erated, WhereSourcePathMatches, WhereTemplateNameMatches, is_sorted | 7 SymbolGroup (extends Symbol): Clustered, CountUniqueSymbols, Filter, GroupedBy,
GroupedByName, GroupedByPath, GroupedBySectionName, Inverted, IterLeafSymbols, I
terUniqueSymbols, Sorted, SortedByAddress, SortedByCount, SortedByName, WhereAdd
ressInRange, WhereFullNameMatches, WhereGeneratedByToolchain, WhereHasAnyAttribu
tion, WhereHasPath, WhereInSection, WhereIsTemplate, WhereMatches, WhereNameMatc
hes, WhereObjectPathMatches, WherePathMatches, WherePssBiggerThan, WhereSizeBigg
erThan, WhereSourceIsGenerated, WhereSourcePathMatches, WhereTemplateNameMatches
, is_sorted |
8 | 8 |
9 SymbolDiff (extends SymbolGroup): IsAdded, IsRemoved, IsSimilar, WhereNotUnchang
ed, added_count, changed_count, removed_count, unchanged_count | 9 SymbolDiff (extends SymbolGroup): IsAdded, IsRemoved, IsSimilar, WhereNotUnchang
ed, added_count, changed_count, removed_count, unchanged_count |
10 | 10 |
11 canned_queries: CategorizeByChromeComponent, CategorizeGenerated, TemplatesByNam
e | 11 canned_queries: CategorizeByChromeComponent, CategorizeGenerated, TemplatesByNam
e |
12 | 12 |
13 Functions: Diff(), Disassemble(), ExpandRegex(), Print(), ShowExamples() | 13 Functions: Diff(), Disassemble(), ExpandRegex(), Print(), ShowExamples() |
14 Variables: canned_queries, size_info | 14 Variables: canned_queries, size_info |
15 ******************************************************************************** | 15 ******************************************************************************** |
16 # Show pydoc for main types: | 16 # Show pydoc for main types: |
17 import models | 17 import models |
18 help(models) | 18 help(models) |
19 | 19 |
20 # Show all attributes of all symbols & per-section totals: | 20 # Show all attributes of all symbols & per-section totals: |
21 Print(size_info, verbose=True) | 21 Print(size_info, verbose=True) |
22 | 22 |
23 # Show two levels of .text, grouped by first two subdirectories | 23 # Show two levels of .text, grouped by first two subdirectories |
24 text_syms = size_info.symbols.WhereInSection("t") | 24 text_syms = size_info.symbols.WhereInSection("t") |
25 by_path = text_syms.GroupedByPath(depth=2) | 25 by_path = text_syms.GroupedByPath(depth=2) |
26 Print(by_path.WhereBiggerThan(1024)) | 26 Print(by_path.WherePssBiggerThan(1024)) |
27 | 27 |
28 # Show all non-vtable generated symbols | 28 # Show all non-vtable generated symbols |
29 generated_syms = size_info.symbols.WhereGeneratedByToolchain() | 29 generated_syms = size_info.symbols.WhereGeneratedByToolchain() |
30 Print(generated_syms.WhereNameMatches(r"vtable").Inverted().Sorted()) | 30 Print(generated_syms.WhereNameMatches(r"vtable").Inverted().Sorted()) |
31 | 31 |
32 # Show all symbols that have "print" in their name or path, except | 32 # Show all symbols that have "print" in their name or path, except |
33 # those within components/. | 33 # those within components/. |
34 # Note: Could have also used Inverted(), as above. | 34 # Note: Could have also used Inverted(), as above. |
35 # Note: Use "help(ExpandRegex)" for more about what {{_print_}} does. | 35 # Note: Use "help(ExpandRegex)" for more about what {{_print_}} does. |
36 print_syms = size_info.symbols.WhereMatches(r"{{_print_}}") | 36 print_syms = size_info.symbols.WhereMatches(r"{{_print_}}") |
(...skipping 10 matching lines...) Expand all Loading... |
47 # For even more inspiration, look at canned_queries.py | 47 # For even more inspiration, look at canned_queries.py |
48 # (and feel free to add your own!). | 48 # (and feel free to add your own!). |
49 Metadata: | 49 Metadata: |
50 elf_arch=arm | 50 elf_arch=arm |
51 elf_build_id=WhatAnAmazingBuildId | 51 elf_build_id=WhatAnAmazingBuildId |
52 elf_file_name=elf | 52 elf_file_name=elf |
53 elf_mtime={redacted} | 53 elf_mtime={redacted} |
54 git_revision=abc123 | 54 git_revision=abc123 |
55 gn_args=var1=true var2="foo" | 55 gn_args=var1=true var2="foo" |
56 map_file_name=../test.map | 56 map_file_name=../test.map |
| 57 tool_prefix=tools/binary_size/libsupersize/testdata/mock_toolchain/ |
57 | 58 |
58 Section Sizes (Total=41.8mb (43785380 bytes)): | 59 Section Sizes (Total=41.8mb (43785380 bytes)): |
59 .bss: 1.24mb (1300456 bytes) (not included in totals) | 60 .bss: 1.24mb (1300456 bytes) (not included in totals) |
60 .data: 99.4kb (101768 bytes) (0.2%) | 61 .data: 99.4kb (101768 bytes) (0.2%) |
61 .data.rel.ro: 1.02mb (1065224 bytes) (2.4%) | 62 .data.rel.ro: 1.02mb (1065224 bytes) (2.4%) |
62 .data.rel.ro.local: 771kb (790024 bytes) (1.8%) | 63 .data.rel.ro.local: 771kb (790024 bytes) (1.8%) |
63 .rodata: 5.65mb (5927652 bytes) (13.5%) | 64 .rodata: 5.65mb (5927652 bytes) (13.5%) |
64 .text: 34.2mb (35900712 bytes) (82.0%) | 65 .text: 34.2mb (35900712 bytes) (82.0%) |
65 | 66 |
66 Showing 48 symbols (45 unique) with total pss: 43785380 bytes | 67 Showing 48 symbols (45 unique) with total pss: 43785380 bytes |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 43) 43785380 (100.0%) b@0x0 131072 third_party/fft_fixed.cc | 158 43) 43785380 (100.0%) b@0x0 131072 third_party/fft_fixed.cc |
158 ff_cos_131072_fixed | 159 ff_cos_131072_fixed |
159 44) 43785380 (100.0%) b@0x0 131072 third_party/fft_float.cc | 160 44) 43785380 (100.0%) b@0x0 131072 third_party/fft_float.cc |
160 ff_cos_65536 | 161 ff_cos_65536 |
161 45) 43785380 (100.0%) b@0x2dffda0 28 third_party/icu/ucnv_ext.c | 162 45) 43785380 (100.0%) b@0x2dffda0 28 third_party/icu/ucnv_ext.c |
162 g_chrome_content_browser_client | 163 g_chrome_content_browser_client |
163 46) 43785380 (100.0%) b@0x2dffe80 200 third_party/icu/ucnv_ext.c | 164 46) 43785380 (100.0%) b@0x2dffe80 200 third_party/icu/ucnv_ext.c |
164 SaveHistogram::atomic_histogram_pointer | 165 SaveHistogram::atomic_histogram_pointer |
165 47) 43785380 (100.0%) b@0x2dffe84 4 third_party/icu/ucnv_ext.c | 166 47) 43785380 (100.0%) b@0x2dffe84 4 third_party/icu/ucnv_ext.c |
166 g_AnimationFrameTimeHistogram_clazz | 167 g_AnimationFrameTimeHistogram_clazz |
OLD | NEW |