-
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
Clean up and streamline snapshot data structures #55906
Clean up and streamline snapshot data structures #55906
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
See also rust-lang/ena#15 |
c189efa
to
350a15a
Compare
I've updated the first commit so that it uses |
@bors r+ |
📌 Commit 350a15ab4ea8ee78336c2289f56a3f67c787aa69 has been approved by |
@bors try |
🙅 Please do not |
☔ The latest upstream changes (presumably #52591) made this pull request unmergeable. Please resolve the merge conflicts. |
350a15a
to
bf614a8
Compare
@bors try |
⌛ Trying commit bf614a8bb532c52c5a721f82b8e65dc8adb1e280 with merge 04eac86e3858e974b9e3bf99acf31e76ad4ac8af... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
bf614a8
to
f61f9ed
Compare
@bors try |
⌛ Trying commit f61f9ed138a073229e19fbbff1a38d2ddbe53a05 with merge 2f28ba5f132d52fb788e30c86134b325180d16c5... |
☀️ Test successful - status-travis |
@rust-timer build 2f28ba5f132d52fb788e30c86134b325180d16c5 |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit bfc1902 has been approved by |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
This version has some significant speed-ups relating to snapshotting.
Because it's as useless as its name suggests. This commit also renames `UndoLog::Noop` as `UndoLog::Purged`, because (a) that's a more descriptive name and (b) it matches the name used in similar code in `librustc/infer/region_constraints/mod.rs`.
So that it matches `librustc_data_structures/snapshot_map/mod.rs` and the `ena` crate.
Because they shouldn't be reused. This provides consistency with the `ena` crate.
This makes the two snapshot implementations more consistent with each other and with crate `ena`.
…ap`. They're not strictly necessary, and they result in the `Vec` being allocated even for the trivial (and common) case where a `start_snapshot` is immediately followed by a `commit` or `rollback_to`.
…straintCollector`. They're not strictly necessary, and they result in the `Vec` being allocated even for the trivial (and common) case where a `start_snapshot` is immediately followed by a `commit` or `rollback_to`. The commit also removes a now-unnecessary argument of `pop_placeholders()`.
bfc1902
to
94967ae
Compare
@bors r=nikomatsakis |
📌 Commit 94967ae has been approved by |
… r=nikomatsakis Clean up and streamline snapshot data structures These commits clean up the snapshot structures a bit, so they are more consistent with each other and with the `ena` crate. They also remove the `OpenSnapshot` and `CommittedSnapshot` entries in the undo log, just like I did for the `ena` crate in rust-lang/ena#14. This PR in combination with that `ena` PR reduces instruction counts by up to 6% on benchmarks. r? @nikomatsakis. Note that this isn't quite ready for landing, because the `ena` dependency in the first commit needs to be updated once rust-lang/ena#14 lands. But otherwise it should be good.
☀️ Test successful - status-appveyor, status-travis |
Just for posterity: this PR finally landed 8 days and 19 hours after the initial r+. I'm sure that's the slowest landing I've ever had. It was in the queue for almost all that time, mostly hovering around positions 6, 7 and 8, continually being bumped. I had to rebase it four or five times, and for one of those rebases I wasn't quick enough and so I missed an opening for landing, which delayed things by few hours more. |
cc @kennytm re. @nnethercote's previous comment... what's up with that? |
First, prioritized edition-critical PRs are flying around between master and beta right now. |
Landing cycle time now exceeds 3 hours, which means there are about 7.5 slots per 24 hours. Combine that with the fact that it feels like intermittent failures are more frequent lately, and the number of successful landings per 24 hours is probably something like 5. |
Final perf results -- wins of up to 5%, with almost every benchmark seeing at least some improvement. |
These commits clean up the snapshot structures a bit, so they are more consistent with each other and with the
ena
crate.They also remove the
OpenSnapshot
andCommittedSnapshot
entries in the undo log, just like I did for theena
crate in rust-lang/ena#14. This PR in combination with thatena
PR reduces instruction counts by up to 6% on benchmarks.r? @nikomatsakis. Note that this isn't quite ready for landing, because the
ena
dependency in the first commit needs to be updated once rust-lang/ena#14 lands. But otherwise it should be good.