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

Cache eval_to_allocation_raw on disk #77006

Merged
merged 2 commits into from
Sep 24, 2020
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Sep 21, 2020

#74949 (comment) regressed the performance on these queries, this PR gets the perf back.

@oli-obk
Copy link
Contributor Author

oli-obk commented Sep 21, 2020

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Sep 21, 2020

⌛ Trying commit c160bf3 with merge 86c0c7bac5afdb8456f7e2d735839fc74aa364f3...

@@ -716,6 +716,10 @@ rustc_queries! {
"const-evaluating + checking `{}`",
key.value.display(tcx)
}
cache_on_disk_if(_, opt_result) {
// Only store results without errors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we only want to store results without errors? Or is this a common thing to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the original motivation was that we can't encode the error, but since today that's just an ErrorHandled and not the error itself anymore, we can probably start writing the entire thing to disk again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, @oli-obk did you intend to update this to remove this if here?

@RalfJung
Copy link
Member

I guess we didn't store this to avoid duplication with the other CTFE query, so it it worth now storing that less often? Or do we want the valtree cached as well?

@oli-obk
Copy link
Contributor Author

oli-obk commented Sep 21, 2020

I think we should measure each individually and act upon those measurements. Computing a valtree may end up being cheap enough for us to never cache it.

@bors
Copy link
Contributor

bors commented Sep 21, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: 86c0c7bac5afdb8456f7e2d735839fc74aa364f3 (86c0c7bac5afdb8456f7e2d735839fc74aa364f3)

@rust-timer
Copy link
Collaborator

Queued 86c0c7bac5afdb8456f7e2d735839fc74aa364f3 with parent a409a23, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (86c0c7bac5afdb8456f7e2d735839fc74aa364f3): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never

@oli-obk
Copy link
Contributor Author

oli-obk commented Sep 21, 2020

r? @Mark-Simulacrum

@oli-obk
Copy link
Contributor Author

oli-obk commented Sep 21, 2020

Here's an aggregated perf view that shows the diff from before the regression to after this PR: https://perf.rust-lang.org/compare.html?start=10b3595ba6a4c658c9dea105488fc562c815e434&end=86c0c7bac5afdb8456f7e2d735839fc74aa364f3

@oli-obk oli-obk added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2020
@Mark-Simulacrum
Copy link
Member

r=me modulo the potential simplification here #77006 (comment)

@Mark-Simulacrum Mark-Simulacrum 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 Sep 24, 2020
@oli-obk
Copy link
Contributor Author

oli-obk commented Sep 24, 2020

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Sep 24, 2020

📌 Commit 40629ef has been approved by Mark-Simulacrum

@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 Sep 24, 2020
@bors
Copy link
Contributor

bors commented Sep 24, 2020

⌛ Testing commit 40629ef with merge 87d262a...

@bors
Copy link
Contributor

bors commented Sep 24, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Mark-Simulacrum
Pushing 87d262a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 24, 2020
@bors bors merged commit 87d262a into rust-lang:master Sep 24, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 24, 2020
@oli-obk oli-obk deleted the 🐌_const_queries branch March 16, 2021 12:14
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. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants