Issue metadata
Sign in to add a comment
|
150kb regression in resource_sizes (MonochromePublic.apk) at 527029:527029 |
||||||||||||||||||||
Issue description
Due to ndk roll. Worth some investigation to see if increase is actually necessary.
Diff shows:
Section Sizes (Total=152kb (155804 bytes)):
.bss: 64 bytes (64 bytes) (not included in totals)
.data: 92 bytes (92 bytes) (0.1%)
.data.rel.ro: 76 bytes (76 bytes) (0.0%)
.other: 1335 bytes (1335 bytes) (0.9%)
.pak.nontranslated: 0 bytes (0 bytes) (0.0%)
.pak.translations: 0 bytes (0 bytes) (0.0%)
.rel.dyn: 120 bytes (120 bytes) (0.1%)
.rodata: -5.79kb (-5926 bytes) (-3.8%)
.text: 150kb (154426 bytes) (99.1%)
Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, p=.pak.translations, P=.pak.nontranslated, o=.other
Index | Running Total | Section@Address | Δ PSS (Δ size_without_padding) | Path
------------------------------------------------------------
~ 0) 6998 (4.6%) t@Group 6998 (0->0) {{no path}}
** symbol gaps (count=9)
~ 1) 13270 (8.7%) t@0x76b3d4 6272 (1452->7724) third_party/skia/src/sksl/SkSLIRGenerator.cpp
SkSL::fill_caps
+ 2) 18273 (12.0%) r@0x0 5002 (0->0) {{no path}}
** aggregate padding of diff'ed symbols
~ 3) 23097 (15.2%) t@0x3796e8 4824 (27476->32300) v8/src/heap/concurrent-marking.cc
v8::internal::ConcurrentMarking::Run
- 4) 18477 (12.2%) t@0x0 -4620 (4616->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/vfprintf.o
printf_core
- 5) 14247 (9.4%) r@0x0 -4230 (22->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a/hash.o
string literal
+ 6) 18343 (12.1%) r@0x2b38120 4096 (0->4096) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/s_exp2.o
tbl
+ 7) 22287 (14.7%) t@0x253df40 3944 (0->3944) third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a/linux-atomic.o
__sync_fetch_and_add_4
- 8) 18779 (12.4%) t@0x0 -3508 (3504->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/floatscan.o
__floatscan
- 9) 15447 (10.2%) t@0x0 -3332 (3328->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/strtod.o
strtod
~ 10) 17203 (11.3%) t@0xa01260 1756 (340->2096) third_party/WebKit/common/mime_util/mime_util.cc
base::LazyInstance<>::Get
- 11) 15602 (10.3%) r@Group -1600 (1600->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/iswalpha.o
table (count=3)
- 12) 14002 (9.2%) r@Group -1600 (1600->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/iswpunct.o
table (count=3)
- 13) 12402 (8.2%) r@Group -1600 (1600->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/intscan.o
table (count=3)
- 14) 10802 (7.1%) r@Group -1600 (1600->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/wcwidth.o
table (count=3)
+ 15) 12334 (8.1%) t@0x253a6c8 1532 (0->1532) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/k_rem_pio2.o
__kernel_rem_pio2
~ 16) 13826 (9.1%) t@0xc006e6 1492 (168->1660) device/bluetooth/bluetooth_device.cc
std::__ndk1::__set_union<>
~ 17) 15240 (10.0%) t@0x8d1d80 1414 (356->1770) net/spdy/core/hpack/hpack_header_table.cc
net::HpackHeaderTable::TryAddEntry
- 18) 13848 (9.1%) t@0x0 -1392 (1392->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/strtod.o
gethex
- 19) 12476 (8.2%) t@0x0 -1372 (1372->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/vfwprintf.o
wprintf_core
~ 20) 13826 (9.1%) t@0x23cea98 1350 (216->1566) components/language/core/browser/heuristic_language_model.cc
language::PromoteRegionScores
~ 21) 15161 (10.0%) o@0x0 1335 (2748->4083) {{no path}}
ELF file overhead
~ 22) 16373 (10.8%) t@0x12d6900 1212 (764->1976) v8/src/inspector/v8-injected-script-host.cc
v8_inspector::V8InjectedScriptHost::getInternalPropertiesCallback
~ 23) 17581 (11.6%) t@0xc45bf6 1208 (264->1472) components/viz/service/surfaces/surface_manager.cc
viz::SurfaceManager::GetLiveSurfacesForReferences
- 24) 16387 (10.8%) t@0x0 -1194 (1192->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a/intscan.o
__intscan
~ 25) 17521 (11.6%) t@0xd55910 1134 (492->1626) content/browser/blob_storage/blob_dispatcher_host.cc
content::BlobDispatcherHost::OnRegisterBlob
~ 26) 18635 (12.3%) t@0x34c180 1114 (4980->6094) v8/src/compiler/escape-analysis.cc
v8::internal::compiler::EscapeAnalysis::Reduce
~ 27) 19697 (13.0%) t@0x235d946 1062 (152->1214) components/dom_distiller/core/dom_distiller_model.cc
dom_distiller::DomDistillerModel::AddEntry
~ 28) 20753 (13.7%) r@0x2b36960 1056 (1664->2720) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a/locale.o
std::__ndk1::__num_get_base::__src
~ 29) 19813 (13.1%) t@0x252d62c -940 (2020->1080) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a/locale.o
std::__ndk1::locale::__imp::__imp
~ 30) 18941 (12.5%) t@0x3f42f0 -872 (1696->824) third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
blink::CSSSelectorParser::ConsumeCompoundSelector
~ 31) 19811 (13.1%) t@0xc461b6 870 (276->1146) components/viz/service/surfaces/surface_manager.cc
viz::SurfaceManager::GetLiveSurfacesForSequences
~ 32) 20667 (13.6%) t@0x36dd58 856 (2684->3540) v8/src/compiler/store-store-elimination.cc
v8::internal::compiler::RedundantStoreFinder::Visit
~ 33) 21495 (14.2%) t@0x21a9428 828 (222->1050) components/safe_browsing/db/v4_get_hash_protocol_manager.cc
safe_browsing::V4GetHashProtocolManager::GetFullHashCachedResults
~ 34) 22311 (14.7%) t@0x15d6ccc 816 (556->1372) components/sync/syncable/directory.cc
syncer::syncable::Directory::InsertEntry
~ 35) 23109 (15.2%) t@0x12d3cdc 798 (204->1002) v8/src/inspector/v8-debugger.cc
v8_inspector::V8Debugger::debuggerIdFor
+ 36) 23901 (15.8%) t@0x253d2b0 792 (0->792) third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a/emutls.o
__emutls_get_address
~ 37) 24681 (16.3%) t@0x14a6d88 780 (324->1104) components/autofill/core/browser/personal_data_manager.cc
autofill::PersonalDataManager::DedupeProfiles
~ 38) 25461 (16.8%) t@0xc7821c 780 (436->1216) media/midi/midi_manager_android.cc
midi::MidiManagerAndroid::AddDevice
~ 39) 26237 (17.3%) t@0x84aa5c 776 (146->922) net/http/http_cache.cc
net::HttpCache::ProcessDoneHeadersQueue
~ 40) 27009 (17.8%) t@0x10ab9f4 772 (2800->3572) v8/src/compiler/move-optimizer.cc
v8::internal::compiler::MoveOptimizer::OptimizeMerge
~ 41) 27779 (18.3%) t@0x22a15e2 770 (394->1164) chrome/browser/android/data_usage/external_data_use_reporter.cc
android::ExternalDataUseReporter::BufferDataUseReport
- 42) 27011 (17.8%) r@0x0 -768 (768->0) third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a/locale_android.o
~ 43) 27779 (18.3%) t@0x1157f68 768 (136->904) v8/src/ic/ic-stats.cc
v8::internal::ICStats::GetOrCacheScriptName
~ 44) 28545 (18.8%) t@0xd58a86 766 (94->860) content/browser/bluetooth/bluetooth_allowed_devices.cc
content::BluetoothAllowedDevices::AddUnionOfServicesTo
~ 45) 29301 (19.3%) t@0x11afb02 756 (570->1326) v8/src/objects/module.cc
v8::internal::Module::ResolveExport
~ 46) 30049 (19.8%) t@0xafe270 748 (56->804) components/viz/common/frame_sinks/begin_frame_source.cc
viz::BackToBackBeginFrameSource::AddObserver
~ 47) 30793 (20.3%) t@0x1845730 744 (304->1048) components/link_header_util/link_header_util.cc
link_header_util::ParseLinkHeaderValue
~ 48) 31535 (20.8%) t@0x13d311c 742 (88->830) third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc
blink::scheduler::TaskQueueThrottler::AddQueueToBudgetPool
~ 49) 32269 (21.3%) t@0x14a7252 734 (174->908) components/autofill/core/browser/personal_data_manager.cc
autofill::PersonalDataManager::ConvertWalletAddressesToLocalProfiles
~ 50) 33001 (21.8%) t@0x11b0fbc 732 (734->1466) v8/src/objects/module.cc
v8::internal::FetchStarExports
,
Jan 5 2018
These two look suspicious:
~ 1) 13270 (8.7%) t@0x76b3d4 6272 (1452->7724) third_party/skia/src/sksl/SkSLIRGenerator.cpp
SkSL::fill_caps
~ 10) 17203 (11.3%) t@0xa01260 1756 (340->2096) third_party/WebKit/common/mime_util/mime_util.cc
base::LazyInstance<>::Get
1) has a bunch of unordered_map::insert calls, and 10) has a bunch of base::hash_set::insert calls (alias of std::unordered_set).
,
Jan 5 2018
,
Jan 5 2018
~ 16) 13826 (9.1%) t@0xc006e6 1492 (168->1660) device/bluetooth/bluetooth_device.cc
std::__ndk1::__set_union<>
~ 17) 15240 (10.0%) t@0x8d1d80 1414 (356->1770) net/spdy/core/hpack/hpack_header_table.cc
net::HpackHeaderTable::TryAddEntry
~ 20) 13826 (9.1%) t@0x23cea98 1350 (216->1566) components/language/core/browser/heuristic_language_model.cc
language::PromoteRegionScores
~ 22) 16373 (10.8%) t@0x12d6900 1212 (764->1976) v8/src/inspector/v8-injected-script-host.cc
v8_inspector::V8InjectedScriptHost::getInternalPropertiesCallback
17 has unordered_set as well.
20 has both unordered_set and unordered_map
22 has many unordered_set inserts.
I think we've found the main culprit :). Likely can do similar to bug 738155 .
,
Jan 16 2018
Top template changes: Print(canned_queries.TemplatesByName(Diff())) ~ 0) -180508 (2259.2%) *@Group -180508 (182032->1524) std::__ndk1::__hash_table<>::__node_insert_unique (count=612) ~ 1) -50898 (637.0%) *@Group 129609 (17330->146940) std::__ndk1::unordered_map<>::operator[] (count=448) + 2) 2065 (-25.9%) *@Group 52964 (0->52964) std::__ndk1::__tree<>::__emplace_unique_key_args<> (count=1561) - 3) -33352 (417.4%) *@Group -35417 (35417->0) std::__ndk1::__tree<>::__insert_unique<> (count=767) - 4) -50748 (635.1%) *@Group -17396 (17396->0) std::__ndk1::__hash_table<>::__insert_unique (count=111) - 5) -66972 (838.2%) *@Group -16224 (16214->0) std::__ndk1::map<>::__construct_node_with_key (count=703) ~ 6) -53318 (667.3%) *@Group 13653 (23376->36889) std::__ndk1::map<>::operator[] (count=1130) ~ 7) -40450 (506.3%) *@Group 12868 (13783->26639) std::__ndk1::__tree<>::__construct_node<> (count=1254) - 8) -51468 (644.2%) *@Group -11018 (11018->0) std::__ndk1::__merge<> (count=132) - 9) -60872 (761.9%) *@Group -9403 (9403->0) std::__ndk1::__hash_table<>::__insert_unique<> (count=192) ~ 10) -51530 (644.9%) *@Group 9341 (18570->27912) std::__ndk1::__tree<>::__find_equal<> (count=1103) ~ 11) -60736 (760.2%) *@Group -9206 (9306->100) std::__ndk1::__tree<>::__node_insert_unique (count=466) - 12) -69160 (865.6%) *@Group -8424 (8424->0) std::__ndk1::map<>::emplace<> (count=130) + 13) -61594 (770.9%) *@Group 7566 (0->7566) std::__ndk1::__hash_table<>::__construct_node_hash<> (count=311) ~ 14) -54148 (677.7%) *@Group 7445 (21546->28992) std::__ndk1::__tree<>::erase (count=635) ~ 15) -46770 (585.4%) *@Group 7378 (1094->8472) std::__ndk1::unordered_map<>::unordered_map (count=28) + 16) -39402 (493.2%) *@Group 7367 (0->7367) std::__ndk1::__half_inplace_merge<> (count=126) ~ 17) -46342 (580.0%) *@Group -6939 (7565->625) std::__ndk1::__hash_table<>::__construct_node<> (count=185) + 18) -39660 (496.4%) *@Group 6681 (0->6681) std::__ndk1::__tree<>::__emplace_hint_unique_key_args<> (count=229) - 19) -46150 (577.6%) *@Group -6489 (6489->0) std::__ndk1::__tree<>::__insert_unique (count=339) - 20) -52528 (657.4%) *@Group -6377 (6377->0) std::__ndk1::__hash_table<>::__deallocate (count=401) + 21) -46192 (578.1%) *@Group 6335 (0->6335) std::__ndk1::__hash_table<>::__deallocate_node (count=401) ~ 22) -40084 (501.7%) *@Group 6108 (102241->108347) std::__ndk1::vector<>::__push_back_slow_path<> (count=2023) + 23) -34362 (430.1%) *@Group 5722 (0->5720) std::__ndk1::__sift_down<> (count=25) + 24) -28751 (359.8%) *@Group 5610 (0->0) ** aggregate padding of diff'ed symbols (count=5) - 25) -34010 (425.7%) *@Group -5259 (5259->0) std::__ndk1::map<>::__find_equal_key (count=158) - 26) -38966 (487.7%) *@Group -4956 (4954->0) std::__ndk1::__push_heap_front<> (count=24) + 27) -34354 (430.0%) *@Group 4612 (0->4612) std::__ndk1::__tree<>::__emplace_multi<> (count=176) + 28) -29823 (373.3%) *@Group 4531 (0->4531) std::__ndk1::pair<>::pair (count=339) - 29) -33982 (425.3%) *@Group -4159 (4159->0) std::__ndk1::map<>::__construct_node<> (count=113) - 30) -37862 (473.9%) *@Group -3879 (3879->0) std::__ndk1::unordered_map<>::__construct_node_with_key (count=199) ~ 31) -34058 (426.3%) *@Group 3803 (630->4434) std::__ndk1::unordered_set<>::unordered_set (count=16) ~ 32) -37656 (471.3%) *@Group -3598 (40648->37049) std::__ndk1::deque<>::__add_back_capacity (count=102) ~ 33) -34104 (426.8%) *@Group 3551 (5208->8760) std::__ndk1::__split_buffer<>::__split_buffer (count=727) - 34) -37426 (468.4%) *@Group -3322 (3320->0) std::__ndk1::__push_heap_back<> (count=22) - 35) -40464 (506.4%) *@Group -3037 (3037->0) std::__ndk1::__tree<>::__insert_multi (count=140) ~ 36) -37434 (468.5%) *@Group 3030 (1669->4699) std::__ndk1::__hash_table<>::find<> const (count=164) + 37) -34468 (431.4%) *@Group 2965 (0->2965) std::__ndk1::__tree<>::__emplace_unique_impl<> (count=50) ~ 38) -32008 (400.6%) *@Group 2459 (32858->35318) std::__ndk1::vector<>::__append (count=409) + 39) -29552 (369.9%) *@Group 2456 (0->2450) std::__ndk1::__sift_up<> (count=16) ~ 40) -31928 (399.6%) *@Group -2375 (68912->66536) std::__ndk1::vector<>::__swap_out_circular_buffer (count=1843) ~ 41) -29656 (371.2%) *@Group 2272 (7843->10115) std::__ndk1::__tree<>::__assign_multi<> (count=128) ~ 42) -27402 (343.0%) *@Group 2253 (2346->4599) std::__ndk1::vector<>::allocate (count=601) ~ 43) -25278 (316.4%) *@Group 2124 (3132->5256) base::LazyInstance<>::Get (count=28) ~ 44) -27395 (342.9%) *@Group -2117 (27799->25682) std::__ndk1::__split_buffer<>::emplace_back<> (count=163) ~ 45) -25315 (316.8%) *@Group 2080 (276->2355) mojo::MapTraits<>::Insert<> (count=11) ~ 46) -23463 (293.7%) *@Group 1852 (63414->65266) std::__ndk1::vector<>::push_back (count=3127) ~ 47) -21789 (272.7%) *@Group 1673 (30632->32306) std::__ndk1::vector<>::__emplace_back_slow_path<> (count=342) ~ 48) -20135 (252.0%) *@Group 1654 (244->1898) std::__ndk1::unordered_set<>::unordered_set<> (count=7) ~ 49) -18483 (231.3%) *@Group 1652 (518->2170) std::__ndk1::__set_union<> (count=3) ~ 50) -16857 (211.0%) *@Group 1626 (2603->4229) base::MRUCacheBase<>::Put<> (count=37)
,
Jan 17 2018
Played a bit with ndk sources. Changing _LIBCPP_INLINE_VISIBILITY -> CHROMIUM_LIBCPP_INLINE_VISIBILITY for: third_party/android_ndk/sources/cxx-stl/llvm-libc++/include/__hash_table * __emplace_unique_key_args * __emplace_unique_impl Eliminates all regressions from the diff in #1, except those from ndk object files and: v8::internal::compiler::EscapeAnalysis::Reduce (likely from from unorderd_map::find()) v8::internal::compiler::RedundantStoreFinder::Visit (likely from unordered_set intersection) v8::internal::compiler::MoveOptimizer::OptimizeMerge (likely from map<>::find() and iteration) However, this only reduced binary size by 30kb (regression was 120kb). I also played with refactoring unordered_map::find, but could save only 8kb that way. I don't think 30kb is worth another ndk special-case, so just going to close as "won't fix". |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by 42576172...@developer.gserviceaccount.com
, Jan 5 2018