Commit 780a9e00 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Supersize: Switch overhead symbols to padding-only

Overhead should be tracked but these symbols are not actionable. Making
them padding-only removes them from size diffs.

Bug: 814078
Change-Id: I68991f54d4ee990c7bd675c4dd0f22e5337eb9f4
Reviewed-on: https://chromium-review.googlesource.com/941587
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540164}
parent 0bcf0ae4
...@@ -445,6 +445,10 @@ def _CalculatePadding(raw_symbols): ...@@ -445,6 +445,10 @@ def _CalculatePadding(raw_symbols):
'Input symbols must be sorted by section, then address.') 'Input symbols must be sorted by section, then address.')
seen_sections.append(symbol.section_name) seen_sections.append(symbol.section_name)
continue continue
if symbol.full_name.startswith('Overhead: '):
# Overhead symbols are not actionable so should be padding-only.
symbol.padding = symbol.size
continue
if (symbol.address <= 0 or prev_symbol.address <= 0 or if (symbol.address <= 0 or prev_symbol.address <= 0 or
symbol.IsPak() or prev_symbol.IsPak()): symbol.IsPak() or prev_symbol.IsPak()):
continue continue
...@@ -798,9 +802,9 @@ def _ParseApkOtherSymbols(section_sizes, apk_path): ...@@ -798,9 +802,9 @@ def _ParseApkOtherSymbols(section_sizes, apk_path):
models.SECTION_OTHER, zip_info.compress_size, models.SECTION_OTHER, zip_info.compress_size,
full_name=zip_info.filename)) full_name=zip_info.filename))
overhead_size = os.path.getsize(apk_path) - zip_info_total overhead_size = os.path.getsize(apk_path) - zip_info_total
apk_symbols.append(models.Symbol( zip_overhead_symbol = models.Symbol(
models.SECTION_OTHER, overhead_size, models.SECTION_OTHER, overhead_size, full_name='Overhead: APK file')
full_name='APK zip overhead')) apk_symbols.append(zip_overhead_symbol)
prev = section_sizes.setdefault(models.SECTION_OTHER, 0) prev = section_sizes.setdefault(models.SECTION_OTHER, 0)
section_sizes[models.SECTION_OTHER] = prev + sum(s.size for s in apk_symbols) section_sizes[models.SECTION_OTHER] = prev + sum(s.size for s in apk_symbols)
return apk_symbols return apk_symbols
...@@ -905,8 +909,7 @@ def CreateSectionSizesAndSymbols( ...@@ -905,8 +909,7 @@ def CreateSectionSizesAndSymbols(
if elf_path: if elf_path:
elf_overhead_symbol = models.Symbol( elf_overhead_symbol = models.Symbol(
models.SECTION_OTHER, elf_overhead_size, models.SECTION_OTHER, elf_overhead_size, full_name='Overhead: ELF file')
full_name='ELF file overhead')
prev = section_sizes.setdefault(models.SECTION_OTHER, 0) prev = section_sizes.setdefault(models.SECTION_OTHER, 0)
section_sizes[models.SECTION_OTHER] = prev + elf_overhead_size section_sizes[models.SECTION_OTHER] = prev + elf_overhead_size
raw_symbols.append(elf_overhead_symbol) raw_symbols.append(elf_overhead_symbol)
......
...@@ -50,7 +50,7 @@ Section .other: has 100.0% of 33984171 bytes accounted for from 1 symbols. 0 byt ...@@ -50,7 +50,7 @@ Section .other: has 100.0% of 33984171 bytes accounted for from 1 symbols. 0 byt
.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={},num_aliases=1) .data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={},num_aliases=1)
.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1) .data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1)
.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1) .data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1)
.other@0(size_without_padding=33984171,padding=0,full_name=ELF file overhead,object_path=,source_path=,flags={},num_aliases=1) .other@0(size_without_padding=33984171,padding=0,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1)
.rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2) .rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2)
.rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2) .rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2)
.rodata@266e605(size_without_padding=16,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1) .rodata@266e605(size_without_padding=16,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
......
...@@ -54,7 +54,7 @@ Section .other: has 100.0% of 33984171 bytes accounted for from 1 symbols. 0 byt ...@@ -54,7 +54,7 @@ Section .other: has 100.0% of 33984171 bytes accounted for from 1 symbols. 0 byt
.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={},num_aliases=1) .data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={},num_aliases=1)
.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1) .data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1)
.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1) .data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1)
.other@0(size_without_padding=33984171,padding=0,full_name=ELF file overhead,object_path=,source_path=,flags={},num_aliases=1) .other@0(size_without_padding=33984171,padding=0,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1)
.rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2) .rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2)
.rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2) .rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2)
.rodata@266e605(size_without_padding=16,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1) .rodata@266e605(size_without_padding=16,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
......
...@@ -122,7 +122,7 @@ Index | Running Total | Section@Address | PSS | Path ...@@ -122,7 +122,7 @@ Index | Running Total | Section@Address | PSS | Path
14) 1957016 (2.5%) R@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o 14) 1957016 (2.5%) R@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o
kSystemClassPrefixes kSystemClassPrefixes
15) 35941187 (46.2%) o@0x0 33984171 {no path} 15) 35941187 (46.2%) o@0x0 33984171 {no path}
ELF file overhead Overhead: ELF file
16) 35941189 (46.2%) r@0x266e600 2.5 (size=5) base/page_allocator.cc 16) 35941189 (46.2%) r@0x266e600 2.5 (size=5) base/page_allocator.cc
string literal (num_aliases=2) string literal (num_aliases=2)
17) 35941192 (46.2%) r@0x266e600 2.5 (size=5) third_party/icu/ucnv_ext.c 17) 35941192 (46.2%) r@0x266e600 2.5 (size=5) third_party/icu/ucnv_ext.c
......
...@@ -26,7 +26,7 @@ GroupCount,Address,SizeWithoutPadding,Padding,NumAliases,PSS,Section,Name ...@@ -26,7 +26,7 @@ GroupCount,Address,SizeWithoutPadding,Padding,NumAliases,PSS,Section,Name
,0x2c17740,789904,0,1,789904.0,R,chrome::mojom::FieldTrialRecorderProxy [vtable] ,0x2c17740,789904,0,1,789904.0,R,chrome::mojom::FieldTrialRecorderProxy [vtable]
,0x2cd84e0,16,16,1,32.0,R,.Lswitch.table.45 ,0x2cd84e0,16,16,1,32.0,R,.Lswitch.table.45
,0x2cd84f0,8,0,1,8.0,R,kSystemClassPrefixes ,0x2cd84f0,8,0,1,8.0,R,kSystemClassPrefixes
,0x0,33984171,0,1,33984171.0,o,ELF file overhead ,0x0,33984171,0,1,33984171.0,o,Overhead: ELF file
,0x266e600,5,0,2,2.5,r,string literal ,0x266e600,5,0,2,2.5,r,string literal
,0x266e600,5,0,2,2.5,r,string literal ,0x266e600,5,0,2,2.5,r,string literal
,0x266e605,16,0,1,16.0,r,string literal ,0x266e605,16,0,1,16.0,r,string literal
......
...@@ -129,7 +129,7 @@ Index | Running Total | Section@Address | ... ...@@ -129,7 +129,7 @@ Index | Running Total | Section@Address | ...
flags={anon} name=kSystemClassPrefixes flags={anon} name=kSystemClassPrefixes
15) 35941187 (46.2%) o@0x0 pss=33984171 padding=0 num_aliases=1 15) 35941187 (46.2%) o@0x0 pss=33984171 padding=0 num_aliases=1
source_path= object_path= source_path= object_path=
flags={} name=ELF file overhead flags={} name=Overhead: ELF file
16) 35941189 (46.2%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 16) 35941189 (46.2%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2
source_path=base/page_allocator.cc object_path=base/base/page_allocator.o source_path=base/page_allocator.cc object_path=base/base/page_allocator.o
flags={} name=string literal flags={} name=string literal
...@@ -311,7 +311,7 @@ Index | Running Total | Section@Address | ... ...@@ -311,7 +311,7 @@ Index | Running Total | Section@Address | ...
flags={anon} name=kSystemClassPrefixes flags={anon} name=kSystemClassPrefixes
15) 35941187 (46.2%) o@0x0 pss=33984171 padding=0 num_aliases=1 15) 35941187 (46.2%) o@0x0 pss=33984171 padding=0 num_aliases=1
source_path= object_path= source_path= object_path=
flags={} name=ELF file overhead flags={} name=Overhead: ELF file
16) 35941189 (46.2%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 16) 35941189 (46.2%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2
source_path=base/page_allocator.cc object_path=base/base/page_allocator.o source_path=base/page_allocator.cc object_path=base/base/page_allocator.o
flags={} name=string literal flags={} name=string literal
......
...@@ -24,7 +24,7 @@ Index | Running Total | Section@Address | PSS | Path ...@@ -24,7 +24,7 @@ Index | Running Total | Section@Address | PSS | Path
11) 1956976 (2.5%) *@Group 789904 chrome::mojom::FieldTrialRecorderProxy [vtable] (count=1) 11) 1956976 (2.5%) *@Group 789904 chrome::mojom::FieldTrialRecorderProxy [vtable] (count=1)
12) 1957008 (2.5%) *@Group 32 .Lswitch.table.45 (count=1) 12) 1957008 (2.5%) *@Group 32 .Lswitch.table.45 (count=1)
13) 1957016 (2.5%) *@Group 8 kSystemClassPrefixes (count=1) 13) 1957016 (2.5%) *@Group 8 kSystemClassPrefixes (count=1)
14) 35941187 (46.2%) *@Group 33984171 ELF file overhead (count=1) 14) 35941187 (46.2%) *@Group 33984171 Overhead: ELF file (count=1)
15) 35941208 (46.2%) *@Group 21 string literal (count=3) 15) 35941208 (46.2%) *@Group 21 string literal (count=3)
16) 35941251 (46.2%) *@Group 43 ** merge strings (count=1) 16) 35941251 (46.2%) *@Group 43 ** merge strings (count=1)
17) 37906596 (48.7%) *@Group 1965345 ** merge constants (count=1) 17) 37906596 (48.7%) *@Group 1965345 ** merge constants (count=1)
...@@ -74,7 +74,7 @@ Index | Running Total | Section@Address | PSS | Path ...@@ -74,7 +74,7 @@ Index | Running Total | Section@Address | PSS | Path
7) 1957008 (2.5%) *@Group 789960 chrome (count=3) 7) 1957008 (2.5%) *@Group 789960 chrome (count=3)
8) 1957040 (2.5%) *@Group 32 .Lswitch.table.45 (count=1) 8) 1957040 (2.5%) *@Group 32 .Lswitch.table.45 (count=1)
9) 1957048 (2.5%) *@Group 8 kSystemClassPrefixes (count=1) 9) 1957048 (2.5%) *@Group 8 kSystemClassPrefixes (count=1)
10) 35941219 (46.2%) *@Group 33984171 ELF file overhead (count=1) 10) 35941219 (46.2%) *@Group 33984171 Overhead: ELF file (count=1)
11) 35941240 (46.2%) *@Group 21 string literal (count=3) 11) 35941240 (46.2%) *@Group 21 string literal (count=3)
12) 35941283 (46.2%) *@Group 43 ** merge strings (count=1) 12) 35941283 (46.2%) *@Group 43 ** merge strings (count=1)
13) 37906628 (48.7%) *@Group 1965345 ** merge constants (count=1) 13) 37906628 (48.7%) *@Group 1965345 ** merge constants (count=1)
...@@ -121,7 +121,7 @@ Index | Running Total | Section@Address | PSS | Path ...@@ -121,7 +121,7 @@ Index | Running Total | Section@Address | PSS | Path
7) 1956976 (2.5%) *@Group 789928 chrome::mojom (count=2) 7) 1956976 (2.5%) *@Group 789928 chrome::mojom (count=2)
8) 1957008 (2.5%) *@Group 32 .Lswitch.table.45 (count=1) 8) 1957008 (2.5%) *@Group 32 .Lswitch.table.45 (count=1)
9) 1957016 (2.5%) *@Group 8 kSystemClassPrefixes (count=1) 9) 1957016 (2.5%) *@Group 8 kSystemClassPrefixes (count=1)
10) 35941187 (46.2%) *@Group 33984171 ELF file overhead (count=1) 10) 35941187 (46.2%) *@Group 33984171 Overhead: ELF file (count=1)
11) 35941208 (46.2%) *@Group 21 string literal (count=3) 11) 35941208 (46.2%) *@Group 21 string literal (count=3)
12) 35941251 (46.2%) *@Group 43 ** merge strings (count=1) 12) 35941251 (46.2%) *@Group 43 ** merge strings (count=1)
13) 37906596 (48.7%) *@Group 1965345 ** merge constants (count=1) 13) 37906596 (48.7%) *@Group 1965345 ** merge constants (count=1)
...@@ -182,7 +182,7 @@ Index | Running Total | Section@Address | PSS | Path ...@@ -182,7 +182,7 @@ Index | Running Total | Section@Address | PSS | Path
9) 1957048 (2.5%) R@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o 9) 1957048 (2.5%) R@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o
kSystemClassPrefixes kSystemClassPrefixes
10) 35941219 (46.2%) o@0x0 33984171 {no path} 10) 35941219 (46.2%) o@0x0 33984171 {no path}
ELF file overhead Overhead: ELF file
11) 35941240 (46.2%) *@Group 21 {no path} 11) 35941240 (46.2%) *@Group 21 {no path}
string literal (count=3) string literal (count=3)
12) 35941283 (46.2%) r@0x266e630 43 {no path} 12) 35941283 (46.2%) r@0x266e630 43 {no path}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment