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

Move CacheDecoder to rustc_query_impl #111842

Closed
wants to merge 1 commit into from

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented May 22, 2023

This moves CacheDecoder back to rustc_query_impl in a new cache_decoder module.

A perf run could a be good idea.

r? @cjgillot

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 22, 2023
@cjgillot
Copy link
Contributor

I'm not convinced by this PR. In general, it's preferable to keep Encodable and Decodable impls close together, as they need to evolve in close sync. In addition, we lose a lot of encapsulation in the cache, which is very unfortunate.

@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 May 22, 2023
@bors
Copy link
Contributor

bors commented May 22, 2023

⌛ Trying commit 23e02152bb775a40ad5b203ac824e97590bf4342 with merge 087b665f9fbafa28735d2ac37ab29bc6d2cf323b...

@bors
Copy link
Contributor

bors commented May 22, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (087b665f9fbafa28735d2ac37ab29bc6d2cf323b): comparison URL.

Overall result: ❌ regressions - no 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.

@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)
0.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 1

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)
- - 0
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
-4.3% [-4.3%, -4.3%] 1
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) -4.3% [-4.3%, -4.3%] 1

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.9%, -4.2%] 4
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 643.403s -> 642.925s (-0.07%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 22, 2023
@cjgillot cjgillot 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 May 28, 2023
@Zoxc
Copy link
Contributor Author

Zoxc commented May 30, 2023

on_disk_cache.rs is large enough to warrant splitting into modules. I also intend to move CacheEncoder to a new module next to it. The loss of encapsulation is unfortunate, but that happens quite a bit in rustc since it's split into many crates. I do prefer that loss over use of unsafe code to keep it in rustc_query_impl however.

Another possible configuration would be to move CacheDecoder and CacheEncoder to rustc_query_system with the impls being next to the types, but that splits the impls up further. Keeping them in rustc_middle isn't a great option if we want to allow other crates to define queries.

@Zoxc Zoxc force-pushed the query-decode-move branch from 23e0215 to eb454af Compare May 30, 2023 20:54
@bors
Copy link
Contributor

bors commented Jun 21, 2023

☔ The latest upstream changes (presumably #112877) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Jun 27, 2023

☔ The latest upstream changes (presumably #112938) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnCSimon
Copy link
Member

@Zoxc
ping from triage - can you post your status on this PR? There hasn't been an update in a few months. Thanks!

FYI: when a PR is ready for review, send a message containing
@rustbot ready to switch to S-waiting-on-review so the PR is in the reviewer's backlog.

@tranquillity-codes
Copy link

tranquillity-codes commented Jan 15, 2024

Closing this due to no activity. Feel free to open a new pr or reopen this

@tranquillity-codes tranquillity-codes added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

7 participants