| OLD | NEW |
| 1 ******************************************************************************** |
| 2 Entering interactive Python shell. Quick reference: |
| 3 |
| 4 SizeInfo: Cluster, metadata, 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 |
| 6 |
| 7 SymbolGroup (extends Symbol): Cluster, CountUniqueSymbols, Filter, GroupBy, Grou
pByNamespace, GroupByPath, GroupBySectionName, Inverted, IterLeafSymbols, IterUn
iqueSymbols, Sorted, SortedByAddress, SortedByCount, SortedByName, WhereAddressI
nRange, WhereBiggerThan, WhereFullNameMatches, WhereGeneratedByToolchain, WhereH
asAnyAttribution, WhereHasPath, WhereInSection, WhereMatches, WhereNameMatches,
WhereObjectPathMatches, WherePathMatches, WhereSourceIsGenerated, WhereSourcePat
hMatches, is_sorted |
| 8 |
| 9 SymbolDiff (extends SymbolGroup): IsAdded, IsRemoved, IsSimilar, WhereNotUnchang
ed, added_count, changed_count, removed_count, unchanged_count |
| 10 |
| 11 Functions: CategorizeByChromeComponent(), CategorizeGenerated(), Diff(), Disasse
mble(), ExpandRegex(), Print(), ShowExamples() |
| 12 Variables: size_info |
| 13 ******************************************************************************** |
| 1 # Show pydoc for main types: | 14 # Show pydoc for main types: |
| 2 import models | 15 import models |
| 3 help(models) | 16 help(models) |
| 4 | 17 |
| 5 # Show all attributes of all symbols & per-section totals: | 18 # Show all attributes of all symbols & per-section totals: |
| 6 Print(size_info, verbose=True) | 19 Print(size_info, verbose=True) |
| 7 | 20 |
| 8 # Show two levels of .text, grouped by first two subdirectories | 21 # Show two levels of .text, grouped by first two subdirectories |
| 9 text_syms = size_info.symbols.WhereInSection("t") | 22 text_syms = size_info.symbols.WhereInSection("t") |
| 10 by_path = text_syms.GroupBySourcePath(depth=2) | 23 by_path = text_syms.GroupByPath(depth=2) |
| 11 Print(by_path.WhereBiggerThan(1024)) | 24 Print(by_path.WhereBiggerThan(1024)) |
| 12 | 25 |
| 13 # Show all non-vtable generated symbols | 26 # Show all non-vtable generated symbols |
| 14 generated_syms = size_info.symbols.WhereGeneratedByToolchain() | 27 generated_syms = size_info.symbols.WhereGeneratedByToolchain() |
| 15 Print(generated_syms.WhereNameMatches(r"vtable").Inverted().Sorted()) | 28 Print(generated_syms.WhereNameMatches(r"vtable").Inverted().Sorted()) |
| 16 | 29 |
| 17 # Show all symbols that have "print" in their name or path, except | 30 # Show all symbols that have "print" in their name or path, except |
| 18 # those within components/. | 31 # those within components/. |
| 19 # Note: Could have also used Inverted(), as above. | 32 # Note: Could have also used Inverted(), as above. |
| 20 # Note: Use "help(ExpandRegex)" for more about what {{_print_}} does. | 33 # Note: Use "help(ExpandRegex)" for more about what {{_print_}} does. |
| 21 print_syms = size_info.symbols.WhereMatches(r"{{_print_}}") | 34 print_syms = size_info.symbols.WhereMatches(r"{{_print_}}") |
| 22 Print(print_syms - print_syms.WherePathMatches(r"^components/")) | 35 Print(print_syms - print_syms.WherePathMatches(r"^components/")) |
| 23 | 36 |
| 24 # Diff two .size files and save result to a file: | 37 # Diff two .size files and save result to a file: |
| 25 Print(Diff(size_info1, size_info2), to_file="output.txt") | 38 Print(Diff(size_info1, size_info2), to_file="output.txt") |
| 26 | 39 |
| 40 # View per-component breakdowns, then inspect the "other" subgroup. |
| 41 c = GroupByChromeComponent() |
| 42 Print(c) |
| 43 Print(c[-1].GroupByPath(depth=2)) |
| 27 Metadata: | 44 Metadata: |
| 28 elf_arch=ARM | 45 elf_arch=ARM |
| 29 elf_build_id=WhatAnAmazingBuildId | 46 elf_build_id=WhatAnAmazingBuildId |
| 30 elf_file_name=elf | 47 elf_file_name=elf |
| 31 elf_mtime={redacted} | 48 elf_mtime={redacted} |
| 32 git_revision=abc123 | 49 git_revision=abc123 |
| 33 gn_args=var1=true var2="foo" | 50 gn_args=var1=true var2="foo" |
| 34 map_file_name=../test.map | 51 map_file_name=../test.map |
| 35 | 52 |
| 36 Section Sizes (Total=43,785,380 bytes): | 53 Section Sizes (Total=43,785,380 bytes): |
| 37 .bss: 1,300,456 bytes (not included in totals) | 54 .bss: 1,300,456 bytes (not included in totals) |
| 38 .data: 101,768 bytes (0.2%) | 55 .data: 101,768 bytes (0.2%) |
| 39 .data.rel.ro: 1,065,224 bytes (2.4%) | 56 .data.rel.ro: 1,065,224 bytes (2.4%) |
| 40 .data.rel.ro.local: 790,024 bytes (1.8%) | 57 .data.rel.ro.local: 790,024 bytes (1.8%) |
| 41 .rodata: 5,927,652 bytes (13.5%) | 58 .rodata: 5,927,652 bytes (13.5%) |
| 42 .text: 35,900,712 bytes (82.0%) | 59 .text: 35,900,712 bytes (82.0%) |
| 43 | 60 |
| 44 Showing 48 symbols (45 unique) with total pss: 44309900 bytes | 61 Showing 48 symbols (45 unique) with total pss: 44309900 bytes |
| 45 .text=34.2mb .rodata=5.65mb other=2.37mb total=42.3mb | 62 .text=34.2mb .rodata=5.65mb other=2.37mb total=42.3mb |
| 46 Number of object files: 10 | 63 Number of object files: 10 |
| 47 | 64 |
| 48 First columns are: running total, address, pss | 65 Index, Running Total, Section@Address, PSS |
| 49 35821002 t@0x24ca628 35821002 {no path} | 66 ------------------------------------------------------------ |
| 67 0) 16 (0.0%) t@0x28d900 16 base/page_allocator.cc |
| 68 _GLOBAL__sub_I_page_allocator.cc |
| 69 1) 72 (0.0%) t@0x28d910 56 base/page_allocator.cc |
| 70 _GLOBAL__sub_I_bbr_sender.cc |
| 71 2) 100 (0.0%) t@0x28d948 28 base/page_allocator.cc |
| 72 _GLOBAL__sub_I_pacing_sender.cc |
| 73 3) 138 (0.0%) t@0x28d964 38 base/page_allocator.cc |
| 74 extFromUUseMapping |
| 75 4) 170 (0.0%) t@0x28d98a 32 base/page_allocator.cc |
| 76 extFromUUseMapping |
| 77 5) 5888 (0.0%) t@0x28f000 5718 {no path} |
| 78 ** symbol gap 0 |
| 79 6) 6336 (0.0%) t@0x28f000 448 third_party/icu/ucnv_ext.c |
| 80 ucnv_extMatchFromU |
| 81 7) 6364 (0.0%) t@0x28f1c8 28 third_party/icu/ucnv_ext.c |
| 82 _GLOBAL__sub_I_SkDeviceProfile.cpp |
| 83 8) 75488 (0.2%) t@0x28f1e0 69124 third_party/icu/ucnv_ext.c |
| 84 foo_bar |
| 85 9) 75512 (0.2%) t@0x2a0000 24 {no path} |
| 86 blink::ContiguousContainerBase::shrinkToFit |
| 87 10) 75536 (0.2%) t@0x2a0000 24 third_party/icu/ucnv_ext.c |
| 88 BazAlias |
| 89 11) 75540 (0.2%) t@0x2a0010 4 third_party/{shared}/2 |
| 90 blink::ContiguousContainerBase::shrinkToFit [clone .part.1234] [clo
ne .isra.2] |
| 91 12) 75544 (0.2%) t@0x2a0010 4 third_party/fft_float.cc |
| 92 FooAlias |
| 93 13) 75548 (0.2%) t@0x2a0010 4 third_party/fft_float.cc |
| 94 BarAlias |
| 95 14) 75576 (0.2%) t@0x2a0020 28 third_party/container.c |
| 96 blink::ContiguousContainerBase::ContiguousContainerBase |
| 97 15) 79616 (0.2%) t@0x2a1000 4040 {no path} |
| 98 ** symbol gap 1 |
| 99 16) 79710 (0.2%) t@0x2a1000 94 third_party/container.c |
| 100 blink::PaintChunker::releasePaintChunks [clone .part.1] |
| 101 17) 35900712 (81.0%) t@0x24ca628 35821002 {no path} |
| 50 ** symbol gap 2 (end of section) | 102 ** symbol gap 2 (end of section) |
| 51 39107114 r@0x2c158e4 3286112 {no path} | 103 18) 37866121 (85.5%) r@0x266e600 1965409 {no path} |
| 104 ** merge strings |
| 105 19) 37866124 (85.5%) r@0x284e364 3 {no path} |
| 106 ** symbol gap 2 |
| 107 20) 37866132 (85.5%) r@0x284e364 8 base/page_allocator.cc |
| 108 21) 37866176 (85.5%) r@0x284e370 44 base/page_allocator.cc |
| 109 Name |
| 110 22) 37866208 (85.5%) r@0x284e398 32 third_party/container.c |
| 111 chrome::mojom::FilePatcher::Name_ |
| 112 23) 38542193 (87.0%) r@0x284e518 675985 {no path} |
| 113 ** merge strings |
| 114 24) 38542248 (87.0%) r@0x28f3450 55 third_party/paint.cc |
| 115 kAnimationFrameTimeHistogramClassPath |
| 116 25) 38542252 (87.0%) r@0x28f3480 4 third_party/paint.cc |
| 117 blink::CSSValueKeywordsHash::findValueImpl::value_word_list |
| 118 26) 41828364 (94.4%) r@0x2c158e4 3286112 {no path} |
| 52 ** symbol gap 3 (end of section) | 119 ** symbol gap 3 (end of section) |
| 53 41072523 r@0x266e600 1965409 {no path} | 120 27) 41828420 (94.4%) d@0x2c176f0 56 third_party/icu/ucnv_ext.c |
| 54 ** merge strings | 121 ChromeMainDelegate [vtable] |
| 55 42137655 d@0x2ddc608 1065132 {no path} | 122 28) 41828444 (94.4%) d@0x2c17728 24 third_party/icu/ucnv_ext.c |
| 123 chrome::mojom::FieldTrialRecorder [vtable] |
| 124 29) 42618348 (96.2%) d@0x2c17740 789904 third_party/container.c |
| 125 chrome::mojom::FieldTrialRecorderProxy [vtable] |
| 126 30) 42618380 (96.2%) d@0x2cd84e0 32 third_party/gvr-android-sdk/libgvr_sh
im_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o |
| 127 .Lswitch.table.45 |
| 128 31) 42618388 (96.2%) d@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_sh
im_static_arm.a/libport_android_jni.a_jni_utils.o |
| 129 kSystemClassPrefixes |
| 130 32) 42618444 (96.2%) d@0x2cd8500 56 third_party/paint.cc |
| 131 ChromeMainDelegateAndroid [vtable] |
| 132 33) 42618468 (96.2%) d@0x2cd8538 24 base/page_allocator.cc |
| 133 mojo::MessageReceiver [vtable] |
| 134 34) 42618480 (96.2%) d@0x2cd8550 12 base/page_allocator.cc |
| 135 kMethodsAnimationFrameTimeHistogram |
| 136 35) 43683612 (98.6%) d@0x2ddc608 1065132 {no path} |
| 56 ** symbol gap 3 (end of section) | 137 ** symbol gap 3 (end of section) |
| 57 42927559 d@0x2c17740 789904 third_party/container.c | 138 36) 43683616 (98.6%) d@0x2de7000 4 base/page_allocator.cc |
| 58 chrome::mojom::FieldTrialRecorderProxy [vtable] | 139 google::protobuf::internal::pLinuxKernelCmpxchg |
| 59 43603544 r@0x284e518 675985 {no path} | 140 37) 43683620 (98.6%) d@0x2de7004 4 third_party/container.c |
| 60 ** merge strings | 141 google::protobuf::internal::pLinuxKernelMemoryBarrier |
| 61 43705144 d@0x2dffd88 101600 {no path} | 142 38) 43683772 (98.6%) d@0x2de7008 152 third_party/container.c |
| 143 base::android::kBaseRegisteredMethods |
| 144 39) 43683776 (98.6%) d@0x2de70a0 4 third_party/container.c |
| 145 base::android::g_renderer_histogram_code |
| 146 40) 43683780 (98.6%) d@0x2de70a4 4 third_party/container.c |
| 147 base::android::g_library_version_number |
| 148 41) 43785380 (98.8%) d@0x2dffd88 101600 {no path} |
| 62 ** symbol gap 3 (end of section) | 149 ** symbol gap 3 (end of section) |
| 63 43774268 t@0x28f1e0 69124 third_party/icu/ucnv_ext.c | 150 42) 43785380 (98.8%) b@0x0 262144 third_party/fft_float.cc |
| 64 foo_bar | |
| 65 43779986 t@0x28f000 5718 {no path} | |
| 66 ** symbol gap 0 | |
| 67 43784026 t@0x2a1000 4040 {no path} | |
| 68 ** symbol gap 1 | |
| 69 43784474 t@0x28f000 448 third_party/icu/ucnv_ext.c | |
| 70 ucnv_extMatchFromU | |
| 71 43784626 d@0x2de7008 152 third_party/container.c | |
| 72 base::android::kBaseRegisteredMethods | |
| 73 43784720 t@0x2a1000 94 third_party/container.c | |
| 74 blink::PaintChunker::releasePaintChunks [clone .part.1] | |
| 75 43784776 d@0x2c176f0 56 third_party/icu/ucnv_ext.c | |
| 76 ChromeMainDelegate [vtable] | |
| 77 43784832 d@0x2cd8500 56 third_party/paint.cc | |
| 78 ChromeMainDelegateAndroid [vtable] | |
| 79 43784888 t@0x28d910 56 base/page_allocator.cc | |
| 80 _GLOBAL__sub_I_bbr_sender.cc | |
| 81 43784943 r@0x28f3450 55 third_party/paint.cc | |
| 82 kAnimationFrameTimeHistogramClassPath | |
| 83 43784967 t@0x2a0000 24 third_party/icu/ucnv_ext.c | |
| 84 BazAlias | |
| 85 43784991 t@0x2a0000 24 {no path} | |
| 86 blink::ContiguousContainerBase::shrinkToFit | |
| 87 43785035 r@0x284e370 44 base/page_allocator.cc | |
| 88 Name | |
| 89 43785073 t@0x28d964 38 base/page_allocator.cc | |
| 90 extFromUUseMapping | |
| 91 43785105 d@0x2cd84e0 32 third_party/gvr-android-sdk/libgvr_shim_static_arm
.a/libcontroller_api_impl.a_controller_api_impl.o | |
| 92 .Lswitch.table.45 | |
| 93 43785137 r@0x284e398 32 third_party/container.c | |
| 94 chrome::mojom::FilePatcher::Name_ | |
| 95 43785169 t@0x28d98a 32 base/page_allocator.cc | |
| 96 extFromUUseMapping | |
| 97 43785197 t@0x28f1c8 28 third_party/icu/ucnv_ext.c | |
| 98 _GLOBAL__sub_I_SkDeviceProfile.cpp | |
| 99 43785225 t@0x28d948 28 base/page_allocator.cc | |
| 100 _GLOBAL__sub_I_pacing_sender.cc | |
| 101 43785253 t@0x2a0020 28 third_party/container.c | |
| 102 blink::ContiguousContainerBase::ContiguousContainerBase | |
| 103 43785277 d@0x2c17728 24 third_party/icu/ucnv_ext.c | |
| 104 chrome::mojom::FieldTrialRecorder [vtable] | |
| 105 43785301 d@0x2cd8538 24 base/page_allocator.cc | |
| 106 mojo::MessageReceiver [vtable] | |
| 107 43785317 t@0x28d900 16 base/page_allocator.cc | |
| 108 _GLOBAL__sub_I_page_allocator.cc | |
| 109 43785321 t@0x2a0010 4 third_party/fft_float.cc | |
| 110 BarAlias | |
| 111 43785325 t@0x2a0010 4 third_party/fft_float.cc | |
| 112 FooAlias | |
| 113 43785329 t@0x2a0010 4 third_party/{shared}/2 | |
| 114 blink::ContiguousContainerBase::shrinkToFit [clone .part.1234] [clo
ne .isra.2] | |
| 115 43785341 d@0x2cd8550 12 base/page_allocator.cc | |
| 116 kMethodsAnimationFrameTimeHistogram | |
| 117 43785349 r@0x284e364 8 base/page_allocator.cc | |
| 118 43785357 d@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm
.a/libport_android_jni.a_jni_utils.o | |
| 119 kSystemClassPrefixes | |
| 120 43785361 d@0x2de70a4 4 third_party/container.c | |
| 121 base::android::g_library_version_number | |
| 122 43785365 d@0x2de70a0 4 third_party/container.c | |
| 123 base::android::g_renderer_histogram_code | |
| 124 43785369 r@0x28f3480 4 third_party/paint.cc | |
| 125 blink::CSSValueKeywordsHash::findValueImpl::value_word_list | |
| 126 43785373 d@0x2de7000 4 base/page_allocator.cc | |
| 127 google::protobuf::internal::pLinuxKernelCmpxchg | |
| 128 43785377 d@0x2de7004 4 third_party/container.c | |
| 129 google::protobuf::internal::pLinuxKernelMemoryBarrier | |
| 130 43785380 r@0x284e364 3 {no path} | |
| 131 ** symbol gap 2 | |
| 132 43785380 b@0x0 262144 third_party/fft_float.cc | |
| 133 ff_cos_131072 | 151 ff_cos_131072 |
| 134 43785380 b@0x0 131072 third_party/fft_fixed.cc | 152 43) 43785380 (98.8%) b@0x0 131072 third_party/fft_fixed.cc |
| 135 ff_cos_131072_fixed | 153 ff_cos_131072_fixed |
| 136 43785380 b@0x0 131072 third_party/fft_float.cc | 154 44) 43785380 (98.8%) b@0x0 131072 third_party/fft_float.cc |
| 137 ff_cos_65536 | 155 ff_cos_65536 |
| 138 43785380 b@0x2dffe80 200 third_party/icu/ucnv_ext.c | 156 45) 43785380 (98.8%) b@0x2dffda0 28 third_party/icu/ucnv_ext.c |
| 157 g_chrome_content_browser_client |
| 158 46) 43785380 (98.8%) b@0x2dffe80 200 third_party/icu/ucnv_ext.c |
| 139 SaveHistogram::atomic_histogram_pointer | 159 SaveHistogram::atomic_histogram_pointer |
| 140 43785380 b@0x2dffda0 28 third_party/icu/ucnv_ext.c | 160 47) 43785380 (98.8%) b@0x2dffe84 4 third_party/icu/ucnv_ext.c |
| 141 g_chrome_content_browser_client | |
| 142 43785380 b@0x2dffe84 4 third_party/icu/ucnv_ext.c | |
| 143 g_AnimationFrameTimeHistogram_clazz | 161 g_AnimationFrameTimeHistogram_clazz |
| OLD | NEW |