Skip to content

Remove eval_always from check_private_in_public. #116316

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Oct 1, 2023

This PR attempts to avoid re-computing check_private_in_public query. First by marking the query as non-eval_always, and by reducing the amount of accesses to HIR as much as possible.

Latest perf #116316 (comment) shows that we manage it. The cost is extra dep-graph bookkeeping.

@rustbot
Copy link
Collaborator

rustbot commented Oct 1, 2023

r? @WaffleLapkin

(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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 1, 2023
@cjgillot
Copy link
Contributor Author

cjgillot commented Oct 1, 2023

@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 Oct 1, 2023
@bors
Copy link
Collaborator

bors commented Oct 1, 2023

⌛ Trying commit 9a97744 with merge 812ab76...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 1, 2023
Remove eval_always from check_private_in_public.
@bors
Copy link
Collaborator

bors commented Oct 1, 2023

☀️ Try build successful - checks-actions
Build commit: 812ab76 (812ab768194c21ae867bde408151983b4f228327)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (812ab76): comparison URL.

Overall result: ❌ regressions - 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)
0.6% [0.3%, 1.2%] 29
Regressions ❌
(secondary)
0.4% [0.3%, 0.8%] 13
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [0.3%, 1.2%] 29

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)
1.5% [1.2%, 1.8%] 5
Regressions ❌
(secondary)
3.0% [3.0%, 3.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.2%, -2.4%] 4
All ❌✅ (primary) 1.5% [1.2%, 1.8%] 5

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

Binary size

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

Bootstrap: 627.128s -> 628.596s (0.23%)
Artifact size: 273.31 MiB -> 273.30 MiB (-0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 2, 2023
@asquared31415
Copy link
Contributor

asquared31415 commented Oct 2, 2023

The perf data looks odd to me, a significant portion of the regressions, including all of the regressions above 1%, have a seemingly spurious downwards spike at the very end of the 30 day graph of similar magnitude to the reported increase for each of those tests.

edit: That may not be spurious improvements, the previous commit was a PR that was expected to have performance improvements. I'm still not convinced that this change should have completely undone them though.

@cjgillot
Copy link
Contributor Author

cjgillot commented Oct 3, 2023

@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 Oct 3, 2023
@bors
Copy link
Collaborator

bors commented Oct 3, 2023

⌛ Trying commit 1da8198 with merge cba27a0...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 3, 2023
Remove eval_always from check_private_in_public.
@bors
Copy link
Collaborator

bors commented Oct 3, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cba27a0): comparison URL.

Overall result: ❌ regressions - 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)
0.6% [0.4%, 0.9%] 21
Regressions ❌
(secondary)
0.4% [0.3%, 0.7%] 30
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [0.4%, 0.9%] 21

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

Cycles

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

Binary size

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

Bootstrap: 620.955s -> 621.494s (0.09%)
Artifact size: 271.99 MiB -> 272.04 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 3, 2023
@petrochenkov petrochenkov self-assigned this Oct 4, 2023
@petrochenkov petrochenkov 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 Oct 4, 2023
@petrochenkov
Copy link
Contributor

The second comment's name suggests that it might have some intersection with #113671, but apparently it does not.

@alex-semenyuk alex-semenyuk removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 2, 2024
@WaffleLapkin WaffleLapkin removed their assignment Oct 18, 2024
@JohnCSimon JohnCSimon added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 29, 2024
@bors

This comment was marked as resolved.

@petrochenkov
Copy link
Contributor

Status is not very clear, still waiting on author.
@cjgillot Do you plan to work on completing it this year?

@petrochenkov
Copy link
Contributor

Closing due to inactivity.

@cjgillot cjgillot reopened this Jul 20, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 20, 2025
@rustbot

This comment was marked as outdated.

@cjgillot
Copy link
Contributor 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 Jul 20, 2025
bors added a commit that referenced this pull request Jul 20, 2025
Remove eval_always from check_private_in_public.
@bors
Copy link
Collaborator

bors commented Jul 20, 2025

⌛ Trying commit 9515b09 with merge 277fb22...

@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 20, 2025
@bors
Copy link
Collaborator

bors commented Jul 20, 2025

☀️ Try build successful - checks-actions
Build commit: 277fb22 (277fb22d01b99c076cf46cc7149c04f2018706e6)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (277fb22): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.6% [0.2%, 2.1%] 28
Regressions ❌
(secondary)
0.4% [0.3%, 0.5%] 18
Improvements ✅
(primary)
-0.6% [-2.7%, -0.2%] 49
Improvements ✅
(secondary)
-0.6% [-1.3%, -0.2%] 17
All ❌✅ (primary) -0.2% [-2.7%, 2.1%] 77

Max RSS (memory usage)

Results (primary 2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.1% [1.6%, 6.6%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [-2.2%, 6.6%] 3

Cycles

Results (secondary -2.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 465.087s -> 466.261s (0.25%)
Artifact size: 374.54 MiB -> 374.53 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 20, 2025
@cjgillot cjgillot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 20, 2025
@petrochenkov
Copy link
Contributor

I'm not sure if the "Use less HIR" part by itself is a perf regression (due to more deps), or an improvement (due to reuse), or neutral.
Perhaps it makes sense to land and benchmark it separately?
@rustbot author

@rustbot rustbot 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 Jul 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 21, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

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-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.

9 participants