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: 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, WhereFullNameMatches, WhereGeneratedByToolchain, WhereHasAnyAttribu
tion, WhereHasPath, WhereInSection, WhereIsTemplate, WhereMatches, WhereNameMatc
hes, WhereObjectPathMatches, WherePathMatches, WherePssBiggerThan, WhereSizeBigg
erThan, WhereSourceIsGenerated, WhereSourcePathMatches, WhereTemplateNameMatches
, is_sorted | 7 SymbolGroup (extends Symbol): CountUniqueSymbols, Filter, GroupedBy, GroupedByNa
me, GroupedByPath, GroupedBySectionName, Inverted, IterLeafSymbols, IterUniqueSy
mbols, Sorted, SortedByAddress, SortedByCount, SortedByName, WhereAddressInRange
, WhereFullNameMatches, WhereGeneratedByToolchain, WhereHasAnyAttribution, Where
HasPath, WhereInSection, WhereIsGroup, WhereIsTemplate, WhereMatches, WhereNameM
atches, WhereObjectPathMatches, WherePathMatches, WherePssBiggerThan, WhereSizeB
iggerThan, WhereSourceIsGenerated, WhereSourcePathMatches, WhereTemplateNameMatc
hes, is_sorted |
8 | 8 |
9 SymbolDiff (extends SymbolGroup): DiffStatus, IsAdded, IsChanged, IsRemoved, IsU
nchanged, WhereNotUnchanged, added_count, changed_count, removed_count, unchange
d_count | 9 SymbolDiff (extends SymbolGroup): DiffStatus, IsAdded, IsChanged, IsRemoved, IsU
nchanged, WhereNotUnchanged, added_count, changed_count, removed_count, unchange
d_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, printed, size_info | 14 Variables: canned_queries, printed, size_info |
15 ******************************************************************************** | 15 ******************************************************************************** |
16 # Show pydoc for main types: | 16 # Show pydoc for main types: |
17 import models | 17 import models |
(...skipping 17 matching lines...) Expand all Loading... |
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_}}") |
37 Print(print_syms - print_syms.WherePathMatches(r"^components/")) | 37 Print(print_syms - print_syms.WherePathMatches(r"^components/")) |
38 | 38 |
39 # Diff two .size files and save result to a file: | 39 # Diff two .size files and save result to a file: |
40 Print(Diff(size_info1, size_info2), to_file="output.txt") | 40 Print(Diff(size_info1, size_info2), to_file="output.txt") |
41 | 41 |
42 # View per-component breakdowns, then drill into the last entry. | 42 # View per-component breakdowns, then drill into the last entry. |
43 c = canned_queries.CategorizeByChromeComponent() | 43 c = canned_queries.CategorizeByChromeComponent() |
44 Print(c) | 44 Print(c) |
45 Print(c[-1].GroupedByPath(depth=2).Clustered().Sorted()) | 45 Print(c[-1].GroupedByPath(depth=2).Sorted()) |
46 | 46 |
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 tool_prefix=tools/binary_size/libsupersize/testdata/mock_toolchain/ |
58 | 58 |
59 Section Sizes (Total=41.8mb (43785380 bytes)): | 59 Section Sizes (Total=41.8mb (43785380 bytes)): |
60 .bss: 1.24mb (1300456 bytes) (not included in totals) | 60 .bss: 1.24mb (1300456 bytes) (not included in totals) |
61 .data: 99.4kb (101768 bytes) (0.2%) | 61 .data: 99.4kb (101768 bytes) (0.2%) |
62 .data.rel.ro: 1.02mb (1065224 bytes) (2.4%) | 62 .data.rel.ro: 1.02mb (1065224 bytes) (2.4%) |
63 .data.rel.ro.local: 771kb (790024 bytes) (1.8%) | 63 .data.rel.ro.local: 771kb (790024 bytes) (1.8%) |
64 .rodata: 5.65mb (5927652 bytes) (13.5%) | 64 .rodata: 5.65mb (5927652 bytes) (13.5%) |
65 .text: 34.2mb (35900712 bytes) (82.0%) | 65 .text: 34.2mb (35900712 bytes) (82.0%) |
66 | 66 |
67 Showing 49 symbols (46 unique) with total pss: 43785380 bytes | 67 Showing 44 symbols (43 unique) with total pss: 43785380 bytes |
68 .text=34.2mb .rodata=5.65mb .data*=1.87mb .bss=512kb total=41.8
mb | 68 .text=34.2mb .rodata=5.65mb .data*=1.87mb .bss=512kb total=41.8
mb |
69 Number of unique paths: 9 | 69 Number of unique paths: 9 |
70 | 70 |
71 Index, Running Total, Section@Address, PSS | 71 Index, Running Total, Section@Address, PSS |
72 ------------------------------------------------------------ | 72 ------------------------------------------------------------ |
73 0) 16 (0.0%) t@0x28d900 16 base/page_allocator.cc | 73 0) 16 (0.0%) t@0x28d900 16 base/page_allocator.cc |
74 _GLOBAL__sub_I_page_allocator.cc | 74 _GLOBAL__sub_I_page_allocator.cc |
75 1) 72 (0.0%) t@0x28d910 56 base/page_allocator.cc | 75 1) 72 (0.0%) t@0x28d910 56 base/page_allocator.cc |
76 _GLOBAL__sub_I_bbr_sender.cc | 76 _GLOBAL__sub_I_bbr_sender.cc |
77 2) 100 (0.0%) t@0x28d948 28 base/page_allocator.cc | 77 2) 100 (0.0%) t@0x28d948 28 base/page_allocator.cc |
78 _GLOBAL__sub_I_pacing_sender.cc | 78 _GLOBAL__sub_I_pacing_sender.cc |
79 3) 138 (0.0%) t@0x28d964 38 base/page_allocator.cc | 79 3) 138 (0.0%) t@0x28d964 38 base/page_allocator.cc |
80 extFromUUseMapping | 80 extFromUUseMapping |
81 4) 170 (0.0%) t@0x28d98a 32 base/page_allocator.cc | 81 4) 170 (0.0%) t@0x28d98a 32 base/page_allocator.cc |
82 extFromUUseMapping | 82 extFromUUseMapping |
83 5) 5888 (0.0%) t@0x28f000 5718 {no path} | 83 5) 35830930 (81.8%) t@Group 35830760 {no path} |
84 ** symbol gap 0 | 84 ** symbol gaps (count=3) |
85 6) 6336 (0.0%) t@0x28f000 448 third_party/icu/ucnv_ext.c | 85 6) 35831378 (81.8%) t@0x28f000 448 third_party/icu/ucnv_ext.c |
86 ucnv_extMatchFromU | 86 ucnv_extMatchFromU |
87 7) 6364 (0.0%) t@0x28f1c8 28 third_party/icu/ucnv_ext.c | 87 7) 35831406 (81.8%) t@0x28f1c8 28 third_party/icu/ucnv_ext.c |
88 _GLOBAL__sub_I_SkDeviceProfile.cpp | 88 _GLOBAL__sub_I_SkDeviceProfile.cpp |
89 8) 75488 (0.2%) t@0x28f1e0 69124 third_party/icu/ucnv_ext.c | 89 8) 35900530 (82.0%) t@0x28f1e0 69124 third_party/icu/ucnv_ext.c |
90 foo_bar | 90 foo_bar |
91 9) 75512 (0.2%) t@0x2a0000 24 {no path} | 91 9) 35900558 (82.0%) t@Group 28 {no path} |
92 blink::ContiguousContainerBase::shrinkToFit | 92 blink::ContiguousContainerBase::shrinkToFit (count=2) |
93 10) 75536 (0.2%) t@0x2a0000 24 third_party/icu/ucnv_ext.c | 93 10) 35900582 (82.0%) t@0x2a0000 24 third_party/icu/ucnv_ext.c |
94 BazAlias | 94 BazAlias |
95 11) 75540 (0.2%) t@0x2a0010 4 third_party/{shared}/2 | 95 11) 35900586 (82.0%) t@0x2a0010 4 third_party/fft_float.cc |
96 blink::ContiguousContainerBase::shrinkToFit [clone .part.1234] [clo
ne .isra.2] | |
97 12) 75544 (0.2%) t@0x2a0010 4 third_party/fft_float.cc | |
98 FooAlias | 96 FooAlias |
99 13) 75548 (0.2%) t@0x2a0010 4 third_party/fft_float.cc | 97 12) 35900590 (82.0%) t@0x2a0010 4 third_party/fft_float.cc |
100 BarAlias | 98 BarAlias |
101 14) 75576 (0.2%) t@0x2a0020 28 third_party/container.c | 99 13) 35900618 (82.0%) t@0x2a0020 28 third_party/container.c |
102 blink::ContiguousContainerBase::ContiguousContainerBase | 100 blink::ContiguousContainerBase::ContiguousContainerBase |
103 15) 79616 (0.2%) t@0x2a1000 4040 {no path} | 101 14) 35900712 (82.0%) t@0x2a1000 94 third_party/container.c |
104 ** symbol gap 1 | 102 blink::PaintChunker::releasePaintChunks |
105 16) 79710 (0.2%) t@0x2a1000 94 third_party/container.c | 103 15) 38538681 (88.0%) r@Group 2637969 {no path} |
106 blink::PaintChunker::releasePaintChunks [clone .part.1] | 104 ** merge strings (count=2) |
107 17) 35900712 (82.0%) t@0x24ca628 35821002 {no path} | 105 16) 38542106 (88.0%) r@0x284d600 3425 {no path} |
108 ** symbol gap 2 (end of section) | |
109 18) 37862696 (86.5%) r@0x266e600 1961984 {no path} | |
110 ** merge strings | |
111 19) 37866121 (86.5%) r@0x284d600 3425 {no path} | |
112 ** merge constants | 106 ** merge constants |
113 20) 37866124 (86.5%) r@0x284e364 3 {no path} | 107 17) 41828221 (95.5%) r@Group 3286115 {no path} |
114 ** symbol gap 0 | 108 ** symbol gaps (count=2) |
115 21) 37866132 (86.5%) r@0x284e364 8 base/page_allocator.cc | 109 18) 41828229 (95.5%) r@0x284e364 8 base/page_allocator.cc |
116 22) 37866176 (86.5%) r@0x284e370 44 base/page_allocator.cc | 110 19) 41828273 (95.5%) r@0x284e370 44 base/page_allocator.cc |
117 Name | 111 Name |
118 23) 37866208 (86.5%) r@0x284e398 32 third_party/container.c | 112 20) 41828305 (95.5%) r@0x284e398 32 third_party/container.c |
119 chrome::mojom::FilePatcher::Name_ | 113 chrome::mojom::FilePatcher::Name_ |
120 24) 38542193 (88.0%) r@0x284e518 675985 {no path} | 114 21) 41828360 (95.5%) r@0x28f3450 55 third_party/paint.cc |
121 ** merge strings | |
122 25) 38542248 (88.0%) r@0x28f3450 55 third_party/paint.cc | |
123 kAnimationFrameTimeHistogramClassPath | 115 kAnimationFrameTimeHistogramClassPath |
124 26) 38542252 (88.0%) r@0x28f3480 4 third_party/paint.cc | 116 22) 41828364 (95.5%) r@0x28f3480 4 third_party/paint.cc |
125 blink::CSSValueKeywordsHash::findValueImpl::value_word_list | 117 blink::CSSValueKeywordsHash::findValueImpl::value_word_list |
126 27) 41828364 (95.5%) r@0x2c158e4 3286112 {no path} | 118 23) 41828420 (95.5%) d@0x2c176f0 56 third_party/icu/ucnv_ext.c |
127 ** symbol gap 1 (end of section) | |
128 28) 41828420 (95.5%) d@0x2c176f0 56 third_party/icu/ucnv_ext.c | |
129 ChromeMainDelegate [vtable] | 119 ChromeMainDelegate [vtable] |
130 29) 41828444 (95.5%) d@0x2c17728 24 third_party/icu/ucnv_ext.c | 120 24) 41828444 (95.5%) d@0x2c17728 24 third_party/icu/ucnv_ext.c |
131 chrome::mojom::FieldTrialRecorder [vtable] | 121 chrome::mojom::FieldTrialRecorder [vtable] |
132 30) 42618348 (97.3%) d@0x2c17740 789904 third_party/container.c | 122 25) 42618348 (97.3%) d@0x2c17740 789904 third_party/container.c |
133 chrome::mojom::FieldTrialRecorderProxy [vtable] | 123 chrome::mojom::FieldTrialRecorderProxy [vtable] |
134 31) 42618380 (97.3%) d@0x2cd84e0 32 third_party/gvr-android-sdk/libgvr_sh
im_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o | 124 26) 42618380 (97.3%) d@0x2cd84e0 32 third_party/gvr-android-sdk/libgvr_sh
im_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o |
135 .Lswitch.table.45 | 125 .Lswitch.table.45 |
136 32) 42618388 (97.3%) d@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_sh
im_static_arm.a/libport_android_jni.a_jni_utils.o | 126 27) 42618388 (97.3%) d@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_sh
im_static_arm.a/libport_android_jni.a_jni_utils.o |
137 kSystemClassPrefixes | 127 kSystemClassPrefixes |
138 33) 42618444 (97.3%) d@0x2cd8500 56 third_party/paint.cc | 128 28) 42618444 (97.3%) d@0x2cd8500 56 third_party/paint.cc |
139 ChromeMainDelegateAndroid [vtable] | 129 ChromeMainDelegateAndroid [vtable] |
140 34) 42618468 (97.3%) d@0x2cd8538 24 base/page_allocator.cc | 130 29) 42618468 (97.3%) d@0x2cd8538 24 base/page_allocator.cc |
141 mojo::MessageReceiver [vtable] | 131 mojo::MessageReceiver [vtable] |
142 35) 42618480 (97.3%) d@0x2cd8550 12 base/page_allocator.cc | 132 30) 42618480 (97.3%) d@0x2cd8550 12 base/page_allocator.cc |
143 kMethodsAnimationFrameTimeHistogram | 133 kMethodsAnimationFrameTimeHistogram |
144 36) 43683612 (99.8%) d@0x2ddc608 1065132 {no path} | 134 31) 43683612 (99.8%) d@0x2ddc608 1065132 {no path} |
145 ** symbol gap 0 (end of section) | 135 ** symbol gap 0 (end of section) |
146 37) 43683616 (99.8%) d@0x2de7000 4 base/page_allocator.cc | 136 32) 43683616 (99.8%) d@0x2de7000 4 base/page_allocator.cc |
147 google::protobuf::internal::pLinuxKernelCmpxchg | 137 google::protobuf::internal::pLinuxKernelCmpxchg |
148 38) 43683620 (99.8%) d@0x2de7004 4 third_party/container.c | 138 33) 43683620 (99.8%) d@0x2de7004 4 third_party/container.c |
149 google::protobuf::internal::pLinuxKernelMemoryBarrier | 139 google::protobuf::internal::pLinuxKernelMemoryBarrier |
150 39) 43683772 (99.8%) d@0x2de7008 152 third_party/container.c | 140 34) 43683772 (99.8%) d@0x2de7008 152 third_party/container.c |
151 base::android::kBaseRegisteredMethods | 141 base::android::kBaseRegisteredMethods |
152 40) 43683776 (99.8%) d@0x2de70a0 4 third_party/container.c | 142 35) 43683776 (99.8%) d@0x2de70a0 4 third_party/container.c |
153 base::android::g_renderer_histogram_code | 143 base::android::g_renderer_histogram_code |
154 41) 43683780 (99.8%) d@0x2de70a4 4 third_party/container.c | 144 36) 43683780 (99.8%) d@0x2de70a4 4 third_party/container.c |
155 base::android::g_library_version_number | 145 base::android::g_library_version_number |
156 42) 43785380 (100.0%) d@0x2dffd88 101600 {no path} | 146 37) 43785380 (100.0%) d@0x2dffd88 101600 {no path} |
157 ** symbol gap 0 (end of section) | 147 ** symbol gap 0 (end of section) |
158 43) 43785380 (100.0%) b@0x0 262144 third_party/fft_float.cc | 148 38) 43785380 (100.0%) b@0x0 262144 third_party/fft_float.cc |
159 ff_cos_131072 | 149 ff_cos_131072 |
160 44) 43785380 (100.0%) b@0x0 131072 third_party/fft_fixed.cc | 150 39) 43785380 (100.0%) b@0x0 131072 third_party/fft_fixed.cc |
161 ff_cos_131072_fixed | 151 ff_cos_131072_fixed |
162 45) 43785380 (100.0%) b@0x0 131072 third_party/fft_float.cc | 152 40) 43785380 (100.0%) b@0x0 131072 third_party/fft_float.cc |
163 ff_cos_65536 | 153 ff_cos_65536 |
164 46) 43785380 (100.0%) b@0x2dffda0 28 third_party/icu/ucnv_ext.c | 154 41) 43785380 (100.0%) b@0x2dffda0 28 third_party/icu/ucnv_ext.c |
165 g_chrome_content_browser_client | 155 g_chrome_content_browser_client |
166 47) 43785380 (100.0%) b@0x2dffe80 200 third_party/icu/ucnv_ext.c | 156 42) 43785380 (100.0%) b@0x2dffe80 200 third_party/icu/ucnv_ext.c |
167 SaveHistogram::atomic_histogram_pointer | 157 SaveHistogram::atomic_histogram_pointer |
168 48) 43785380 (100.0%) b@0x2dffe84 4 third_party/icu/ucnv_ext.c | 158 43) 43785380 (100.0%) b@0x2dffe84 4 third_party/icu/ucnv_ext.c |
169 g_AnimationFrameTimeHistogram_clazz | 159 g_AnimationFrameTimeHistogram_clazz |
OLD | NEW |