Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc_metadata: Merge items from extern blocks into their parent modules during metadata encoding rather than during metadata decoding #92153

Merged
merged 1 commit into from
Dec 28, 2021

Conversation

petrochenkov
Copy link
Contributor

No description provided.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 21, 2021
@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2021
@petrochenkov
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 21, 2021
@bors
Copy link
Contributor

bors commented Dec 21, 2021

⌛ Trying commit f6052e3c3952ef9fb66aade565e0e0f92374dcd7 with merge b821a59989a52a2fdf83c4c28319ed44b7ea78c1...

@bors
Copy link
Contributor

bors commented Dec 21, 2021

☀️ Try build successful - checks-actions
Build commit: b821a59989a52a2fdf83c4c28319ed44b7ea78c1 (b821a59989a52a2fdf83c4c28319ed44b7ea78c1)

@rust-timer
Copy link
Collaborator

Queued b821a59989a52a2fdf83c4c28319ed44b7ea78c1 with parent 46171fa, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b821a59989a52a2fdf83c4c28319ed44b7ea78c1): comparison url.

Summary: This change led to large relevant regressions 😿 in compiler performance.

  • Large regression in instruction counts (up to 2.2% on incr-unchanged builds of issue-88862)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 21, 2021
@petrochenkov
Copy link
Contributor Author

We are doing less (in the worst case no more) work during both encoding and decoding, but apparently the tcx.hir().item(*item_id) part is somewhat expensive when called for all items in modules and eats the difference.

My plan was to simplify fn each_child_of_item until it can return an iterator, to avoid allocations in its users.
So I'm still interested in shifting this work from decoding to encoding somehow.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 21, 2021
@Mark-Simulacrum
Copy link
Member

It may be worth re-running now that rust-lang/rustc-perf#1126 has at least partially been patched.

@petrochenkov
Copy link
Contributor Author

Yeah, given that results in e.g. #92156 don't make any sense I can only assume that it's all noise.

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 22, 2021
@bors
Copy link
Contributor

bors commented Dec 22, 2021

⌛ Trying commit 6100620fe97a0b4274034d83bd1f06e6e730153f with merge 0fb8c713229632bcd6bf7499ab7cf3de179d1d54...

@petrochenkov petrochenkov removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. perf-regression Performance regression. labels Dec 22, 2021
@bors
Copy link
Contributor

bors commented Dec 22, 2021

☀️ Try build successful - checks-actions
Build commit: 0fb8c713229632bcd6bf7499ab7cf3de179d1d54 (0fb8c713229632bcd6bf7499ab7cf3de179d1d54)

@rust-timer
Copy link
Collaborator

Queued 0fb8c713229632bcd6bf7499ab7cf3de179d1d54 with parent e100ec5, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0fb8c713229632bcd6bf7499ab7cf3de179d1d54): comparison url.

Summary: This change led to large relevant regressions 😿 in compiler performance.

  • Large regression in instruction counts (up to 2.3% on incr-unchanged builds of issue-88862)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

@rustbot rustbot added the perf-regression Performance regression. label Dec 22, 2021
@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 28, 2021
@petrochenkov
Copy link
Contributor Author

r? @cjgillot

@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Dec 28, 2021

📌 Commit a5efcea has been approved by cjgillot

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 28, 2021
@bors
Copy link
Contributor

bors commented Dec 28, 2021

⌛ Testing commit a5efcea with merge 27bbaf5f378ca48047a53312d8aded2e2d985755...

@bors
Copy link
Contributor

bors commented Dec 28, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 28, 2021
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
9 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
10 


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to D:\a\rust\rust\build\x86_64-pc-windows-msvc\test\ui\panics\panic-short-backtrace-windows-x86_64\panic-short-backtrace-windows-x86_64.run.stderr
error: 1 errors occurred comparing run output.
status: exit code: 101
status: exit code: 101
command: PATH="D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2\lib\rustlib\x86_64-pc-windows-msvc\lib;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0-bootstrap-tools\x86_64-pc-windows-msvc\release\deps;D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin;D:\a\rust\rust\ninja;D:\a\rust\rust\msys2\mingw64\bin;C:\hostedtoolcache\windows\Python\3.10.1\x64\Scripts;C:\hostedtoolcache\windows\Python\3.10.1\x64;C:\msys64\usr\bin;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\2.7.3\x64;C:\cabal\bin;C:\ghcup\bin;C:\tools\ghc-9.2.1\bin;C:\Program Files\dotnet;C:\mysql\bin;C:\Program Files\R\R-4.1.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\hostedtoolcache\windows\go\1.15.15\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.9\x64\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.312-7\x64\bin;C:\npm\prefix;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\nodejs;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.4\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\SeleniumWebDrivers\ChromeDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Microsoft BizTalk Server;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\panics\\panic-short-backtrace-windows-x86_64\\a.exe"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
thread 'main' panicked at 'd was called', D:\a\rust\rust\src/test\ui\panics\panic-short-backtrace-windows-x86_64.rs:48:5
   0: std::panicking::begin_panic
   1: d
   2: c
   3: b
---

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-msvc target=x86_64-pc-windows-msvc


command did not execute successfully: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools-bin\\compiletest.exe" "--compile-lib-path" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin" "--run-lib-path" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "--rustc-path" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "--src-base" "D:\\a\\rust\\rust\\src/test\\ui" "--build-base" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui" "--stage-id" "stage2-x86_64-pc-windows-msvc" "--suite" "ui" "--mode" "ui" "--target" "x86_64-pc-windows-msvc" "--host" "x86_64-pc-windows-msvc" "--llvm-filecheck" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\llvm\\build\\bin\\FileCheck.exe" "--nodejs" "C:\\Program Files\\nodejs\\node" "--npm" "C:\\Program Files\\nodejs\\npm" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers" "--docck-python" "C:\\hostedtoolcache\\windows\\Python\\3.10.1\\x64\\python3.exe" "--lldb-python" "C:\\hostedtoolcache\\windows\\Python\\3.10.1\\x64\\python3.exe" "--gdb" "C:\\msys64\\usr\\bin\\gdb" "--llvm-version" "13.0.0-rust-1.59.0-nightly" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwp engine executionengine extensions filecheck frontendopenacc frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irreader jitlink libdriver lineeditor linker lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


Build completed unsuccessfully in 0:30:52
Build completed unsuccessfully in 0:30:52
make: *** [Makefile:74: ci-subset-2] Error 1

@matthiaskrgr
Copy link
Member

@bors retry #92000

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 28, 2021
@bors
Copy link
Contributor

bors commented Dec 28, 2021

⌛ Testing commit a5efcea with merge 442248d...

@bors bors mentioned this pull request Dec 28, 2021
@bors
Copy link
Contributor

bors commented Dec 28, 2021

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 442248d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 28, 2021
@bors bors merged commit 442248d into rust-lang:master Dec 28, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 28, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (442248d): comparison url.

Summary: This change led to small relevant regressions 😿 in compiler performance.

  • Small regression in instruction counts (up to 1.2% on incr-unchanged builds of deeply-nested-closures)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

@rustbot rustbot added the perf-regression Performance regression. label Dec 28, 2021
@petrochenkov
Copy link
Contributor Author

Small regression in instruction counts (up to 1.2% on incr-unchanged builds of deeply-nested-closures)

The results don't make any sense to me.
They are entirely different from the previous run (#92153 (comment)) and local testing with cg_diff shows mostly unrelated changes in inlining choices around fn imported_source_files.

9,003,249 (9805.2%)  :<rustc_span::SourceFile as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
-8,972,806 (-9772.1%)  :<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <rustc_metadata::rmeta::Lazy<[rustc_span::SourceFile], usize>>::decode<&rustc_metadata::creader::CrateMetadataRef>::{closure#0}>, <rustc_metadata::creader::CrateMetadataRef>::imported_source_files::{closure#3}::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<rustc_metadata::rmeta::decoder::ImportedSourceFile, <alloc::vec::Vec<rustc_metadata::rmeta::decoder::ImportedSourceFile> as alloc::vec::spec_extend::SpecExtend<rustc_metadata::rmeta::decoder::ImportedSourceFile, core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <rustc_metadata::rmeta::Lazy<[rustc_span::SourceFile], usize>>::decode<&rustc_metadata::creader::CrateMetadataRef>::{closure#0}>, <rustc_metadata::creader::CrateMetadataRef>::imported_source_files::{closure#3}::{closure#0}>>>::spec_extend::{closure#0}>::{closure#0}>
   109,843 (119.6%)  :<rustc_span::span_encoding::Span as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   -60,555 (-65.9%)  :<rustc_span::span_encoding::Span>::new
   -57,792 (-62.9%)  :<rustc_metadata::creader::CrateMetadataRef>::imported_source_files
    56,690 (61.74%)  :__memcpy_avx_unaligned_erms
    17,728 (19.31%)  :<alloc::borrow::Cow<str>>::into_owned
    -4,750 (-5.17%)  :<rustc_span::symbol::Symbol as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
    -4,452 (-4.85%)  :<(rustc_span::symbol::Symbol, rustc_span::def_id::DefIndex) as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
    -4,168 (-4.54%)  :<rustc_metadata::creader::CStore>::item_children_untracked
     3,800 ( 4.14%)  :<rustc_metadata::rmeta::decoder::DecodeContext as rustc_serialize::serialize::Decoder>::read_str
     3,520 ( 3.83%)  :<rustc_ast::ast::AttrStyle as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
     2,790 ( 3.04%)  :<rustc_ast::token::Lit as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
    -2,745 (-2.99%)  :<<rustc_ast::token::Lit as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode as core::ops::function::FnOnce<(&mut rustc_metadata::rmeta::decoder::DecodeContext,)>>::call_once
     2,604 ( 2.84%)  :<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <rustc_metadata::rmeta::Lazy<[(rustc_span::symbol::Symbol, rustc_span::def_id::DefIndex)], usize>>::decode<&rustc_metadata::creader::CrateMetadataRef>::{closure#0}>, <rustc_metadata::creader::CrateMetadataRef>::get_diagnostic_items::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::symbol::Symbol, rustc_span::def_id::DefId), <hashbrown::map::HashMap<rustc_span::symbol::Symbol, rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>> as core::iter::traits::collect::Extend<(rustc_span::symbol::Symbol, rustc_span::def_id::DefId)>>::extend<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <rustc_metadata::rmeta::Lazy<[(rustc_span::symbol::Symbol, rustc_span::def_id::DefIndex)], usize>>::decode<&rustc_metadata::creader::CrateMetadataRef>::{closure#0}>, <rustc_metadata::creader::CrateMetadataRef>::get_diagnostic_items::{closure#0}>>::{closure#0}>::{closure#0}>
     2,560 ( 2.79%)  :<rustc_ast::token::CommentKind as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
     1,428 ( 1.56%)  :llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool)
    -1,370 (-1.49%)  :<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <rustc_metadata::rmeta::Lazy<[rustc_span::def_id::DefIndex], usize>>::decode<&rustc_metadata::creader::CrateMetadataRef>::{closure#0}>, <rustc_metadata::creader::CrateMetadataRef>::get_struct_field_names::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<rustc_span::source_map::Spanned<rustc_span::symbol::Symbol>, <alloc::vec::Vec<rustc_span::source_map::Spanned<rustc_span::symbol::Symbol>> as alloc::vec::spec_extend::SpecExtend<rustc_span::source_map::Spanned<rustc_span::symbol::Symbol>, core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <rustc_metadata::rmeta::Lazy<[rustc_span::def_id::DefIndex], usize>>::decode<&rustc_metadata::creader::CrateMetadataRef>::{closure#0}>, <rustc_metadata::creader::CrateMetadataRef>::get_struct_field_names::{closure#0}>>>::spec_extend::{closure#0}>::{closure#0}>
    -1,196 (-1.30%)  :__vfscanf_internal
    -1,171 (-1.28%)  :malloc_consolidate
      -910 (-0.99%)  :llvm::DenseMap<void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*>, llvm::detail::DenseMapPair<void const*, llvm::PassInfo const*> >::grow(unsigned int)
      -773 (-0.84%)  :____strtoul_l_internal
       564 ( 0.61%)  :_int_free
      -535 (-0.58%)  :<rustc_ast::token::Token as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
       508 ( 0.55%)  :<rustc_span::source_map::SourceMap>::new_imported_source_file
       495 ( 0.54%)  :<rustc_metadata::rmeta::decoder::DecodeContext as rustc_serialize::serialize::Decoder>::read_enum_variant_arg::<rustc_ast::ast::Lit, <rustc_ast::ast::Lit as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode>
       495 ( 0.54%)  :<rustc_ast::ast::StrStyle as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
      -480 (-0.52%)  :<<rustc_ast::ast::StrStyle as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode as core::ops::function::FnOnce<(&mut rustc_metadata::rmeta::decoder::DecodeContext,)>>::call_once
       405 ( 0.44%)  :<rustc_metadata::rmeta::decoder::DecodeContext as rustc_middle::ty::codec::TyDecoder>::cached_ty_for_shorthand::<<&rustc_middle::ty::TyS as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode::{closure#0}>
      -275 (-0.30%)  :<rustc_metadata::rmeta::CrateDep as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
      -260 (-0.28%)  :<rustc_ast::ast::Attribute as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
       241 ( 0.26%)  :<hashbrown::raw::RawTable<(rustc_span::source_map::StableSourceFileId, alloc::rc::Rc<rustc_span::SourceFile>)>>::insert::<hashbrown::map::make_hasher<rustc_span::source_map::StableSourceFileId, rustc_span::source_map::StableSourceFileId, alloc::rc::Rc<rustc_span::SourceFile>, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>::{closure#0}>
       230 ( 0.25%)  :_dl_relocate_object
      -174 (-0.19%)  :<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <rustc_metadata::rmeta::Lazy<[rustc_span::def_id::DefIndex], usize>>::decode<&rustc_metadata::creader::CrateMetadataRef>::{closure#0}>, <rustc_metadata::creader::CrateMetadataRef>::get_struct_field_visibilities::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<rustc_middle::ty::Visibility, <alloc::vec::Vec<rustc_middle::ty::Visibility> as alloc::vec::spec_extend::SpecExtend<rustc_middle::ty::Visibility, core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <rustc_metadata::rmeta::Lazy<[rustc_span::def_id::DefIndex], usize>>::decode<&rustc_metadata::creader::CrateMetadataRef>::{closure#0}>, <rustc_metadata::creader::CrateMetadataRef>::get_struct_field_visibilities::{closure#0}>>>::spec_extend::{closure#0}>::{closure#0}>
      -144 (-0.16%)  :<rustc_metadata::rmeta::decoder::DecodeContext as rustc_serialize::serialize::Decoder>::read_struct::<rustc_metadata::rmeta::CrateRoot, <rustc_metadata::rmeta::CrateRoot as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode::{closure#0}>
      -140 (-0.15%)  :<rustc_metadata::creader::CStore>::get_crate_data
      -105 (-0.11%)  :memset

@pnkfelix
Copy link
Member

pnkfelix commented Jan 4, 2022

This appears to be an improvement to the overall pipeline for compilation (assuming that in the common case overall, metadata is decoded far more often than encoded), and thus even if this small regression is real (which I'm not certain it is, especially given that all the data points are annotated with "?" in the perf output), I think we would accept the regression anyway.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.