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

get auto traits for parallel rustc #114321

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

SparrowLii
Copy link
Member

@SparrowLii SparrowLii commented Aug 1, 2023

test for #106930
#[Edit] Since this doesn't block try build now, we can close #106930

fixes #106930

@rustbot
Copy link
Collaborator

rustbot commented Aug 1, 2023

r? @GuillaumeGomez

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 1, 2023
@SparrowLii
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

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

bors commented Aug 1, 2023

⌛ Trying commit fa8c9e81efef424afb6402ee59e09fc462948bbe with merge edce5d2154161dfde9ad8d19239056aab2729ace...

@SparrowLii
Copy link
Member Author

r? @ghost

@rustbot
Copy link
Collaborator

rustbot commented Aug 1, 2023

Failed to set assignee to ghost: invalid assignee

Note: Only org members, users with write permissions, or people who have commented on the PR may be assigned.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Aug 1, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (edce5d2154161dfde9ad8d19239056aab2729ace): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

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 may lead 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-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.0% [0.4%, 5.5%] 224
Regressions ❌
(secondary)
2.9% [0.5%, 6.2%] 218
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.5% [-5.5%, -5.5%] 1
All ❌✅ (primary) 3.0% [0.4%, 5.5%] 224

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
4.1% [1.2%, 13.1%] 209
Regressions ❌
(secondary)
6.5% [1.6%, 12.3%] 235
Improvements ✅
(primary)
-1.2% [-1.7%, -0.9%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.0% [-1.7%, 13.1%] 213

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
8.3% [1.2%, 19.6%] 228
Regressions ❌
(secondary)
11.0% [1.7%, 40.2%] 250
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 8.3% [1.2%, 19.6%] 228

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 650.5s -> 700.813s (7.73%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 1, 2023
@SparrowLii
Copy link
Member Author

Since this doesn't block try build now, I think we can close #106930

@bors try

@bors
Copy link
Contributor

bors commented Aug 2, 2023

⌛ Trying commit 8e64d0e9ae42b614fb4c415616fb4e4e40d8d57a with merge eb645e6032bff1f65217b238ece3523c9ca142e9...

@oli-obk
Copy link
Contributor

oli-obk commented Aug 2, 2023

I looked at perf with cachegrind, because it appears that the only regression now is in TyCtxt creation?! Here's the helloworld-Check-Full result:

5,945,915  /build/glibc-sMfBJT/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:__memcpy_avx_unaligned_erms
  218,061  ???:<rustc_middle::query::QueryStates as core::default::Default>::default
  177,519  ???:<rustc_middle::query::QueryCaches as core::default::Default>::default
   81,407  ???:core::ptr::drop_in_place::<rustc_middle::query::QueryStates>
   59,298  /build/glibc-sMfBJT/glibc-2.31/elf/dl-lookup.c:_dl_lookup_symbol_x
  -50,218  ???:<rustc_middle::ty::Ty as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   49,714  ???:core::ptr::drop_in_place::<rustc_middle::query::QueryCaches>
   34,947  ???:<rustc_type_ir::sty::TyKind<rustc_middle::ty::context::TyCtxt> as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   29,170  ???:<rustc_metadata::rmeta::LazyTable<rustc_span::def_id::DefIndex, core::option::Option<rustc_metadata::rmeta::LazyValue<rustc_metadata::rmeta::VariantData>>>>::get::<rustc_metadata::creader::CrateMetadataRef>
  -29,110  ???:<rustc_metadata::rmeta::LazyTable<rustc_span::def_id::DefIndex, core::option::Option<rustc_metadata::rmeta::LazyValue<rustc_span::hygiene::ExpnId>>>>::get::<rustc_metadata::creader::CrateMetadataRef>
   28,700  /build/glibc-sMfBJT/glibc-2.31/elf/dl-addr.c:_dl_addr
   22,786  ???:<rustc_span::span_encoding::Span as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   22,532  /build/glibc-sMfBJT/glibc-2.31/elf/dl-lookup.c:do_lookup_x
  -22,140  ???:<odht::HashTable<rustc_hir::def_path_hash_map::Config, rustc_data_structures::owned_slice::OwnedSlice>>::from_raw_bytes
  -21,604  /build/glibc-sMfBJT/glibc-2.31/string/../sysdeps/x86_64/strcmp.S:strcmp
   20,269  ???:<odht::raw_table::RawTable<[u8; 16], [u8; 4], odht::unhash::UnHashFn>>::sanity_check_hashes
  -14,357  ???:<&rustc_middle::ty::list::List<rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   14,041  ???:<[(); 32]>::map::<<rustc_data_structures::sharded::Sharded<std::collections::hash::map::HashMap<rustc_middle::ty::context::InternedInSet<rustc_middle::ty::adt::AdtDefData>, (), core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>>::new<<std::collections::hash::map::HashMap<rustc_middle::ty::context::InternedInSet<rustc_middle::ty::adt::AdtDefData>, (), core::hash::BuildHasherDefault<rustc_hash::FxHasher>> as core::default::Default>::default>::{closure
  -12,784  /build/glibc-sMfBJT/glibc-2.31/elf/../sysdeps/x86_64/dl-machine.h:_dl_relocate_object
  -10,492  ???:<rustc_infer::infer::equate::Equate as rustc_middle::ty::relate::TypeRelation>::regions
    9,896  ???:<rustc_middle::ty::sty::Region as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
    8,869  ???:<rustc_infer::infer::region_constraints::RegionConstraintCollector>::make_eqregion
    8,766  ???:<rustc_middle::ty::adt::AdtDef as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
    8,440  ???:rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
    8,420  ???:rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::impl_trait_ref::dynamic_query::{closure
    7,148  ???:rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
    6,912  ???:<hashbrown::raw::RawTable<(rustc_middle::ty::instance::InstanceDef, rustc_query_system::query::plumbing::QueryResult<rustc_middle::dep_graph::dep_node::DepKind>)> as core::ops::drop::Drop>::drop
    6,813  ???:<rustc_middle::ty::context::CtxtInterners>::intern_ty

Is the regression truly just the fact that we generate N shards for the caches? And that this requires an allocation?

@rust-log-analyzer

This comment has been minimized.

@SparrowLii
Copy link
Member Author

We did a lot work earlier to research the regression of parallel rustc in #101566. Most regression come from accessing Lock and query caches. We have so far found ways to limit the regression to about 2%.

However this doesn't matter with #106930

@oli-obk
Copy link
Contributor

oli-obk commented Aug 2, 2023

However this doesn't matter with #106930

oh yea, I was just wondering about that part independently from thsi PR. I guess since it's a total of 2ms it doesn't really matter in the bigger picture.

src/bootstrap/config.rs Outdated Show resolved Hide resolved
@oli-obk
Copy link
Contributor

oli-obk commented Aug 2, 2023

@bors delegate=SparrowLii

@bors
Copy link
Contributor

bors commented Aug 2, 2023

✌️ @SparrowLii, you can now approve this pull request!

If @oli-obk told you to "r=me" after making some further change, please make that change, then do @bors r=@oli-obk

@bors
Copy link
Contributor

bors commented Aug 2, 2023

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

Signed-off-by: SparrowLii <liyuan179@huawei.com>
@SparrowLii SparrowLii marked this pull request as ready for review August 2, 2023 08:24
@SparrowLii
Copy link
Member Author

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 2, 2023

📌 Commit 90db113 has been approved by SparrowLii

It is now in the queue for this repository.

@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 Aug 2, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Aug 2, 2023

@bors r-
@bors r+

(when it's your own PR, you need to use @bors r=reviewer)

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 2, 2023
@bors

This comment was marked as resolved.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 2, 2023
@bors

This comment was marked as resolved.

@bors

This comment was marked as resolved.

@oli-obk

This comment was marked as resolved.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 2, 2023
@bors
Copy link
Contributor

bors commented Aug 2, 2023

📌 Commit 90db113 has been approved by oli-obk

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 2, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2023
Rollup of 5 pull requests

Successful merges:

 - rust-lang#114079 (Use `upvar_tys` in more places, make it return a list)
 - rust-lang#114166 (Add regression test for resolving `--extern libc=test.rlib`)
 - rust-lang#114321 (get auto traits for parallel rustc)
 - rust-lang#114335 (fix and extend ptr_comparison test)
 - rust-lang#114347 (x.py print more detailed format files and untracked files count)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0475873 into rust-lang:master Aug 2, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exponential (?) time complexity in evaluate_trait_predicate_recursively in rustdoc when proving Send/Sync
7 participants