-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
resolve: Querify most cstore access methods #108346
Conversation
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit fd355955badae2867f5ffc62fdda9f9b1016f65c with merge 6921c114d603a50fda8f8c768d60a9858aa19770... |
@@ -501,7 +501,9 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) { | |||
tcx.arena | |||
.alloc_slice(&CStore::from_tcx(tcx).crate_dependencies_in_postorder(LOCAL_CRATE)) | |||
}, | |||
crates: |tcx, ()| tcx.arena.alloc_from_iter(CStore::from_tcx(tcx).crates_untracked()), | |||
crates: |tcx, ()| { | |||
tcx.arena.alloc_from_iter(CStore::from_tcx(tcx).iter_crate_data().map(|(cnum, _)| cnum)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this technically the only place where we need to freeze the CStore
lock? If you can't iterate, it seems sound to still keep adding stuff to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should freeze it here either way to avoid it accidentally being called during name resolution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #109536.
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (6921c114d603a50fda8f8c768d60a9858aa19770): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking 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 @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
|
Blocked on #108992. |
This comment was marked as resolved.
This comment was marked as resolved.
resolve: Querify most cstore access methods (subset) A subset of rust-lang#108346 that is not on a hot path in any way.
This comment has been minimized.
This comment has been minimized.
Local results are pretty disappointing. Here are some instruction count diffs from cachegrind (on hello-world, no incremental).
In incremental mode regressions are even worse due to loading/storing the increasingly heavy dependency graph. |
#109137 is the subset that is less likely to cause perf regressions. |
Finished benchmarking commit (ea2759c7c65edc30f8a3de1891c9c7260a352ddb): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking 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 @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
|
resolve: Querify most cstore access methods (subset) A subset of rust-lang/rust#108346 that is not on a hot path in any way.
resolve: Querify most cstore access methods (subset 2) These changes are less likely to cause perf regressions than the rest of rust-lang#108346.
resolve: Querify most cstore access methods (subset 2) These changes are less likely to cause perf regressions than the rest of rust-lang#108346.
resolve: Querify most cstore access methods (subset 2) These changes are less likely to cause perf regressions than the rest of rust-lang#108346.
resolve: Querify most cstore access methods (subset 2) These changes are less likely to cause perf regressions than the rest of rust-lang#108346.
Superseded by #109536. |
resolve: Rename some cstore methods to match queries and add comments about costs associated with replacing them with query calls. Supersedes rust-lang#108346. r? `@cjgillot`
resolve: Querify most cstore access methods (subset) A subset of rust-lang/rust#108346 that is not on a hot path in any way.
resolve: Querify most cstore access methods (subset) A subset of rust-lang/rust#108346 that is not on a hot path in any way.
There are still a couple of "untracked" methods, but they don't have equivalent existing queries, and I'm not sure they need to be turned into queries right now.