rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.91k stars 12.52k forks source link

Binary size is significant increased from `1.46.0` to `1.51.0` #86610

Open yangby-cryptape opened 3 years ago

yangby-cryptape commented 3 years ago

In Brief

Our project changed the locked rust-toolchain from 1.46.0 to 1.51.0. Then binary size (x86_64-unknown-linux-gnu, release) is significant increased (49 MiB -> 53 MiB, +8.2%).

Details

Size of .strtab section is significant increased

I used cargo build --release to build the same code with rust 1.46.0 and rust 1.51.0.

Then I analyzed the binary with readelf -SW target/release/program.

I got the follow result:

Build with "rust 1.46.0" . ```diff Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al ... omit ... [28] .comment PROGBITS 0000000000000000 2085012 000056 01 MS 0 0 1 [29] .debug_aranges PROGBITS 0000000000000000 2085070 00b800 00 0 0 16 [30] .debug_pubnames PROGBITS 0000000000000000 2090870 0319df 00 0 0 1 [31] .debug_info PROGBITS 0000000000000000 20c224f 1e00e3 00 0 0 1 [32] .debug_abbrev PROGBITS 0000000000000000 22a2332 00b131 00 0 0 1 [33] .debug_line PROGBITS 0000000000000000 22ad463 117909 00 0 0 1 [34] .debug_frame PROGBITS 0000000000000000 23c4d70 0003d0 00 0 0 8 +[35] .debug_str PROGBITS 0000000000000000 23c5140 0e85a0 01 MS 0 0 1 [36] .debug_loc PROGBITS 0000000000000000 24ad6e0 2871ca 00 0 0 1 [37] .debug_macinfo PROGBITS 0000000000000000 27348aa 000008 00 0 0 1 [38] .debug_pubtypes PROGBITS 0000000000000000 27348b2 000168 00 0 0 1 +[39] .debug_ranges PROGBITS 0000000000000000 2734a1a 118370 00 0 0 1 [40] .debug_macro PROGBITS 0000000000000000 284cd8a 01f346 00 0 0 1 [41] .symtab SYMTAB 0000000000000000 286c0d0 2b2438 18 42 90248 8 +[42] .strtab STRTAB 0000000000000000 2b1e508 532530 00 0 0 1 [43] .shstrtab STRTAB 0000000000000000 3050a38 0001b9 00 0 0 1 ```
Build with "rust 1.51.0" . ```diff Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al ... omit ... [28] .comment PROGBITS 0000000000000000 2026010 000041 01 MS 0 0 1 [29] .debug_aranges PROGBITS 0000000000000000 2026060 00ba00 00 0 0 16 [30] .debug_pubnames PROGBITS 0000000000000000 2031a60 05090f 00 0 0 1 [31] .debug_info PROGBITS 0000000000000000 208236f 1f479a 00 0 0 1 [32] .debug_abbrev PROGBITS 0000000000000000 2276b09 00a671 00 0 0 1 [33] .debug_line PROGBITS 0000000000000000 228117a 11c9b6 00 0 0 1 [34] .debug_frame PROGBITS 0000000000000000 239db30 000310 00 0 0 8 -[35] .debug_str PROGBITS 0000000000000000 239de40 127597 01 MS 0 0 1 [36] .debug_loc PROGBITS 0000000000000000 24c53d7 25f5a8 00 0 0 1 [37] .debug_pubtypes PROGBITS 0000000000000000 272497f 000156 00 0 0 1 -[38] .debug_ranges PROGBITS 0000000000000000 2724ad5 133990 00 0 0 1 [39] .debug_macro PROGBITS 0000000000000000 2858465 01f346 00 0 0 1 [40] .symtab SYMTAB 0000000000000000 28777b0 2ce278 18 41 87213 8 -[41] .strtab STRTAB 0000000000000000 2b45a28 85e081 00 0 0 1 [42] .shstrtab STRTAB 0000000000000000 33a3aa9 0001aa 00 0 0 1 ```

The difference between the .strtab sections

I don't have enough knowledge about compilation.

I just saw the .strtab was increased too much, so I used the follow command to read the .strtab: readelf -p .strtab target/release/program.

Data in "rust 1.46.0" version looked like this: ``` [ 4001d] _ZN4core3ptr13drop_in_place17h91e8a4684aa5bd75E [ 4004d] _ZN4core3ptr13drop_in_place17h91ebfdfda4ff2f38E [ 4007d] _ZN4core3ptr13drop_in_place17h9891992968ce58b0E [ 400ad] _ZN4core3ptr13drop_in_place17h9d0e94ad475b5353E [ 400dd] _ZN4core3ptr13drop_in_place17ha07d7ac542382d06E [ 4010d] _ZN4core3ptr13drop_in_place17ha178018f01c15180E [ 4013d] _ZN4core3ptr13drop_in_place17ha6141b7b8134a0e9E [ 4016d] _ZN4core3ptr13drop_in_place17ha61ea8e5714dbf7aE [ 4019d] _ZN4core3ptr13drop_in_place17ha82c9971ab670ad1E [ 401cd] _ZN4core3ptr13drop_in_place17hb538543c79f06870E [ 401fd] _ZN4core3ptr13drop_in_place17hb8d87f3da3596f48E ```
Data in "rust 1.51.0" version looked like this: ``` [ 40018] _ZN4core3ptr211drop_in_place$LT$crossbeam_channel..channel..Sender$LT$ckb_types..core..service..Request$LT$alloc..string..String$C$crossbeam_channel..channel..Receiver$LT$ckb_types..generated..extensions..Alert$GT$$GT$$GT$$GT$17h72b661e6242bc8abE [ 4010f] _ZN4core3ptr212drop_in_place$LT$alloc..sync..Arc$LT$core..cell..UnsafeCell$LT$core..option..Option$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$$GT$$GT$$GT$17h44ee18b5d1a169d7E [ 40207] _ZN4core3ptr215drop_in_place$LT$core..cell..UnsafeCell$LT$std..sync..mpsc..Flavor$LT$crossbeam_channel..channel..Receiver$LT$$LP$ckb_types..core..service..PoolTransactionEntry$C$ckb_types..core..tx_pool..Reject$RP$$GT$$GT$$GT$$GT$17h9fe3c36d708de64cE [ 40302] _ZN4core3ptr2164drop_in_place$LT$futures_util..future..future..map..MapProjReplace$LT$futures_util..future..try_future..into_future..IntoFuture$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..try_future..AndThen$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..future..Map$LT$futures_channel..oneshot..Receiver$LT$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$$C$heim_runtime..shims..polyfill..pool..FuturePool..spawn$LT$heim_runtime..shims..polyfill..fs..read_to_string$LT$$RF$str$GT$..$u7b$$u7b$closure$u7d$$u7d$$C$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$$LT$std..io..error..Error$u20$as$u20$core..convert..Into$LT$heim_common..errors..Error$GT$$GT$..into$GT$$C$futures_util..future..ready..Ready$LT$core..result..Result$LT$uom..si..Quantity$LT$dyn$u20$uom..si..Dimension$u2b$Th$u20$$u3d$$u20$typenum..int..Z0$u2b$Kind$u20$$u3d$$u20$dyn$u20$uom..Kind$u2b$L$u20$$u3d$$u20$typenum..int..Z0$u2b$J$u20$$u3d$$u20$typenum..int..Z0$u2b$T$u20$$u3d$$u20$typenum..int..PInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$GT$$u2b$N$u20$$u3d$$u20$typenum..int..Z0$u2b$I$u20$$u3d$$u20$typenum..int..Z0$u2b$M$u20$$u3d$$u20$typenum..int..Z0$C$dyn$u20$uom..si..Units$LT$f64$GT$$u2b$amount_of_substance$u20$$u3d$$u20$uom..si..amount_of_substance..mole$u2b$mass$u20$$u3d$$u20$uom..si..mass..kilogram$u2b$thermodynamic_temperature$u20$$u3d$$u20$uom..si..thermodynamic_temperature..kelvin$u2b$electric_current$u20$$u3d$$u20$uom..si..electric_current..ampere$u2b$luminous_intensity$u20$$u3d$$u20$uom..si..luminous_intensity..candela$u2b$length$u20$$u3d$$u20$uom..si..length..meter$u2b$time$u20$$u3d$$u20$uom..si..time..second$C$f64$GT$$C$heim_common..errors..Error$GT$$GT$$C$heim_host..sys..linux..boot_time..boot_time..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$$LT$heim_common..errors..Error$u20$as$u20$core..convert..Into$LT$heim_process..errors..ProcessError$GT$$GT$..into$GT$$GT$$C$futures_util..fns..MapOkFn$LT$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$$GT$17h7e5e2c2efddf5257E [ 40b9b] _ZN4core3ptr218drop_in_place$LT$crossbeam_channel..channel..Sender$LT$ckb_types..core..service..Request$LT$alloc..string..String$C$crossbeam_channel..channel..Receiver$LT$ckb_types..core..service..PoolTransactionEntry$GT$$GT$$GT$$GT$17hbea8c09cd7b45536E [ 40c99] _ZN4core3ptr219drop_in_place$LT$std..thread..Builder..spawn_unchecked$LT$ctrlc..set_handler$LT$ckb_bin..subcommand..run..run..$u7b$$u7b$closure$u7d$$u7d$$GT$..$u7b$$u7b$closure$u7d$$u7d$$C$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17heed4bcf6689faffbE [ 40d98] _ZN4core3ptr2210drop_in_place$LT$pin_project_lite..__private..UnsafeOverwriteGuard$LT$futures_util..future..future..map..Map$LT$futures_util..future..try_future..into_future..IntoFuture$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..try_future..AndThen$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..future..Map$LT$futures_channel..oneshot..Receiver$LT$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$$C$heim_runtime..shims..polyfill..pool..FuturePool..spawn$LT$heim_runtime..shims..polyfill..fs..read_to_string$LT$$RF$str$GT$..$u7b$$u7b$closure$u7d$$u7d$$C$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$$LT$std..io..error..Error$u20$as$u20$core..convert..Into$LT$heim_common..errors..Error$GT$$GT$..into$GT$$C$futures_util..future..ready..Ready$LT$core..result..Result$LT$uom..si..Quantity$LT$dyn$u20$uom..si..Dimension$u2b$Th$u20$$u3d$$u20$typenum..int..Z0$u2b$Kind$u20$$u3d$$u20$dyn$u20$uom..Kind$u2b$L$u20$$u3d$$u20$typenum..int..Z0$u2b$J$u20$$u3d$$u20$typenum..int..Z0$u2b$T$u20$$u3d$$u20$typenum..int..PInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$GT$$u2b$N$u20$$u3d$$u20$typenum..int..Z0$u2b$I$u20$$u3d$$u20$typenum..int..Z0$u2b$M$u20$$u3d$$u20$typenum..int..Z0$C$dyn$u20$uom..si..Units$LT$f64$GT$$u2b$amount_of_substance$u20$$u3d$$u20$uom..si..amount_of_substance..mole$u2b$mass$u20$$u3d$$u20$uom..si..mass..kilogram$u2b$thermodynamic_temperature$u20$$u3d$$u20$uom..si..thermodynamic_temperature..kelvin$u2b$electric_current$u20$$u3d$$u20$uom..si..electric_current..ampere$u2b$luminous_intensity$u20$$u3d$$u20$uom..si..luminous_intensity..candela$u2b$length$u20$$u3d$$u20$uom..si..length..meter$u2b$time$u20$$u3d$$u20$uom..si..time..second$C$f64$GT$$C$heim_common..errors..Error$GT$$GT$$C$heim_host..sys..linux..boot_time..boot_time..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$$LT$heim_common..errors..Error$u20$as$u20$core..convert..Into$LT$heim_process..errors..ProcessError$GT$$GT$..into$GT$$GT$$C$futures_util..fns..MapOkFn$LT$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$$GT$$GT$17he0b80f1db643d29eE [ 4165f] _ZN4core3ptr228drop_in_place$LT$futures..sync..mpsc..Sender$LT$$LP$futures..sync..oneshot..Sender$LT$core..result..Result$LT$hyper..body..chunk..Chunk$C$ckb_miner..client..RpcError$GT$$GT$$C$jsonrpc_core..types..request..MethodCall$RP$$GT$$GT$17h31894c90ae4df6f2E [ 41767] _ZN4core3ptr251drop_in_place$LT$alloc..sync..Arc$LT$futures..sync..mpsc..Inner$LT$$LP$futures..sync..oneshot..Sender$LT$core..result..Result$LT$hyper..body..chunk..Chunk$C$ckb_miner..client..RpcError$GT$$GT$$C$jsonrpc_core..types..request..MethodCall$RP$$GT$$GT$$GT$17h675971abbd3df620E [ 41886] _ZN4core3ptr256drop_in_place$LT$std..thread..Builder..spawn_unchecked$LT$ckb_memory_tracker..process..track_current_process$LT$ckb_rocksdb..optimistic_transaction_db..OptimisticTransactionDB$GT$..$u7b$$u7b$closure$u7d$$u7d$$C$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hc52d6b58bc6d599fE [ 419aa] _ZN4core3ptr259drop_in_place$LT$crossbeam_channel..channel..Receiver$LT$ckb_types..core..service..Request$LT$$LP$alloc..sync..Arc$LT$ckb_types..core..views..BlockView$GT$$C$ckb_verification_traits..Switch$RP$$C$core..result..Result$LT$bool$C$ckb_error..Error$GT$$GT$$GT$$GT$17h60a1f6cbdf514b3eE [ 41ad1] _ZN4core3ptr261drop_in_place$LT$crossbeam_channel..channel..Sender$LT$ckb_types..core..service..Request$LT$alloc..string..String$C$crossbeam_channel..channel..Receiver$LT$$LP$ckb_types..core..service..PoolTransactionEntry$C$ckb_types..core..tx_pool..Reject$RP$$GT$$GT$$GT$$GT$17h5ef845f66a3f0eecE [ 41bfa] _ZN4core3ptr3327drop_in_place$LT$pin_project_lite..__private..UnsafeOverwriteGuard$LT$futures_util..future..future..map..Map$LT$futures_util..future..try_future..into_future..IntoFuture$LT$futures_util..future..try_future..AndThen$LT$futures_util..future..try_future..AndThen$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..future..Map$LT$futures_channel..oneshot..Receiver$LT$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$$C$heim_runtime..shims..polyfill..pool..FuturePool..spawn$LT$heim_runtime..shims..polyfill..fs..read_to_string$LT$alloc..string..String$GT$..$u7b$$u7b$closure$u7d$$u7d$$C$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$futures_util..future..ready..Ready$LT$core..result..Result$LT$heim_process..sys..linux..process..procfs..stat..Stat$C$heim_process..errors..ProcessError$GT$$GT$$C$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$futures_util..future..try_future..MapOk$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..try_future..AndThen$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..future..Map$LT$futures_channel..oneshot..Receiver$LT$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$$C$heim_runtime..shims..polyfill..pool..FuturePool..spawn$LT$heim_runtime..shims..polyfill..fs..read_to_string$LT$$RF$str$GT$..$u7b$$u7b$closure$u7d$$u7d$$C$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$$LT$std..io..error..Error$u20$as$u20$core..convert..Into$LT$heim_common..errors..Error$GT$$GT$..into$GT$$C$futures_util..future..ready..Ready$LT$core..result..Result$LT$uom..si..Quantity$LT$dyn$u20$uom..si..Dimension$u2b$Th$u20$$u3d$$u20$typenum..int..Z0$u2b$Kind$u20$$u3d$$u20$dyn$u20$uom..Kind$u2b$L$u20$$u3d$$u20$typenum..int..Z0$u2b$J$u20$$u3d$$u20$typenum..int..Z0$u2b$T$u20$$u3d$$u20$typenum..int..PInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$GT$$u2b$N$u20$$u3d$$u20$typenum..int..Z0$u2b$I$u20$$u3d$$u20$typenum..int..Z0$u2b$M$u20$$u3d$$u20$typenum..int..Z0$C$dyn$u20$uom..si..Units$LT$f64$GT$$u2b$amount_of_substance$u20$$u3d$$u20$uom..si..amount_of_substance..mole$u2b$mass$u20$$u3d$$u20$uom..si..mass..kilogram$u2b$thermodynamic_temperature$u20$$u3d$$u20$uom..si..thermodynamic_temperature..kelvin$u2b$electric_current$u20$$u3d$$u20$uom..si..electric_current..ampere$u2b$luminous_intensity$u20$$u3d$$u20$uom..si..luminous_intensity..candela$u2b$length$u20$$u3d$$u20$uom..si..length..meter$u2b$time$u20$$u3d$$u20$uom..si..time..second$C$f64$GT$$C$heim_common..errors..Error$GT$$GT$$C$heim_host..sys..linux..boot_time..boot_time..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$$LT$heim_common..errors..Error$u20$as$u20$core..convert..Into$LT$heim_process..errors..ProcessError$GT$$GT$..into$GT$$C$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$$C$futures_util..fns..MapOkFn$LT$heim_process..sys..linux..process..get..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$$GT$$GT$17h98e07de89979f97cE [ 4291e] _ZN4core3ptr3544drop_in_place$LT$futures_util..future..try_future..MapOk$LT$futures_util..future..future..Then$LT$futures_util..future..lazy..Lazy$LT$heim_process..sys..linux..process..current..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$futures_util..future..try_future..MapOk$LT$futures_util..future..try_future..AndThen$LT$futures_util..future..try_future..AndThen$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..future..Map$LT$futures_channel..oneshot..Receiver$LT$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$$C$heim_runtime..shims..polyfill..pool..FuturePool..spawn$LT$heim_runtime..shims..polyfill..fs..read_to_string$LT$alloc..string..String$GT$..$u7b$$u7b$closure$u7d$$u7d$$C$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$futures_util..future..ready..Ready$LT$core..result..Result$LT$heim_process..sys..linux..process..procfs..stat..Stat$C$heim_process..errors..ProcessError$GT$$GT$$C$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$futures_util..future..try_future..MapOk$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..try_future..AndThen$LT$futures_util..future..try_future..MapErr$LT$futures_util..future..future..Map$LT$futures_channel..oneshot..Receiver$LT$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$$C$heim_runtime..shims..polyfill..pool..FuturePool..spawn$LT$heim_runtime..shims..polyfill..fs..read_to_string$LT$$RF$str$GT$..$u7b$$u7b$closure$u7d$$u7d$$C$core..result..Result$LT$alloc..string..String$C$std..io..error..Error$GT$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$$LT$std..io..error..Error$u20$as$u20$core..convert..Into$LT$heim_common..errors..Error$GT$$GT$..into$GT$$C$futures_util..future..ready..Ready$LT$core..result..Result$LT$uom..si..Quantity$LT$dyn$u20$uom..si..Dimension$u2b$Th$u20$$u3d$$u20$typenum..int..Z0$u2b$Kind$u20$$u3d$$u20$dyn$u20$uom..Kind$u2b$L$u20$$u3d$$u20$typenum..int..Z0$u2b$J$u20$$u3d$$u20$typenum..int..Z0$u2b$T$u20$$u3d$$u20$typenum..int..PInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$GT$$u2b$N$u20$$u3d$$u20$typenum..int..Z0$u2b$I$u20$$u3d$$u20$typenum..int..Z0$u2b$M$u20$$u3d$$u20$typenum..int..Z0$C$dyn$u20$uom..si..Units$LT$f64$GT$$u2b$amount_of_substance$u20$$u3d$$u20$uom..si..amount_of_substance..mole$u2b$mass$u20$$u3d$$u20$uom..si..mass..kilogram$u2b$thermodynamic_temperature$u20$$u3d$$u20$uom..si..thermodynamic_temperature..kelvin$u2b$electric_current$u20$$u3d$$u20$uom..si..electric_current..ampere$u2b$luminous_intensity$u20$$u3d$$u20$uom..si..luminous_intensity..candela$u2b$length$u20$$u3d$$u20$uom..si..length..meter$u2b$time$u20$$u3d$$u20$uom..si..time..second$C$f64$GT$$C$heim_common..errors..Error$GT$$GT$$C$heim_host..sys..linux..boot_time..boot_time..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$$LT$heim_common..errors..Error$u20$as$u20$core..convert..Into$LT$heim_process..errors..ProcessError$GT$$GT$..into$GT$$C$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$heim_process..sys..linux..process..procfs..stat..stat..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$heim_process..sys..linux..process..get..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$heim_process..sys..linux..process..get$GT$$C$$LT$heim_process..sys..linux..process..Process$u20$as$u20$core..convert..Into$LT$heim_process..process..Process$GT$$GT$..into$GT$$GT$17h0ae0136220ef4e6cE ```

Another test

I tried compiling tokio-rs/mini-redis with toolchain between 1.45.0 to 1.53.0.

I got the follow table: | Rust Toolchain (x86_64-unknown-linux-gnu) | mini-redis-cli (bytes) | mini-redis-server (bytes) | | |-------------------------------------------|------------------------|---------------------------|----------| | 1.45.0 | 5_773_944 | 6_130_144 | | | 1.46.0 | 5_745_464 | 6_078_856 | Smallest | | 1.47.0 | 6_351_224 | 6_711_960 | | | 1.48.0 | 6_365_384 | 6_711_368 | | | 1.49.0 | 6_358_304 | 6_709_568 | | | 1.50.0 | 6_444_968 | 6_800_512 | | | 1.51.0 | 6_605_840 | 6_985_976 | Biggest | | 1.52.0 | 6_544_608 | 6_909_416 | | | 1.53.0 | 6_420_752 | 6_791_440 | |

From the above table, we could got the follow conclusions:

Related Issues

jyn514 commented 3 years ago

See also https://github.com/rust-lang/rust/issues/86431

inquisitivecrystal commented 3 years ago

@rustbot label +I-heavy

bjorn3 commented 3 years ago

This seems to be the result of https://github.com/rust-lang/rust/pull/79968 which landed in 1.51. It changes the symbol names of drop_in_place to include which type is actually being dropped. The v0 symbol mangling scheme which we hope to adopt in the near future does the same thing, but also includes generic parameters for all other functions, resulting in even longer symbol names.

apiraino commented 3 years ago

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-medium