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

Add an ensure_sufficient_stack to LateContextAndPass::visit_expr #112673

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

scottmcm
Copy link
Member

This is apparently where it's busting stack in #112238, and the comments for ensure_sufficient_stack say that

E.g. almost any call to visit_expr or equivalent can benefit from this.

So this seems like a reasonable change.

Hopefully it'll keep this from happening in other places too -- #111818 (comment) hit something similar when updating a lint (bors failure is https://github.com/rust-lang-ci/rust/actions/runs/5199591324/jobs/9377196369), so with any luck this will keep small permutations of things from tripping over the limit.

This is apparently where it's busting stack, and the comments for `ensure_sufficient_stack` say that

> E.g. almost any call to visit_expr or equivalent can benefit from this.
@rustbot
Copy link
Collaborator

rustbot commented Jun 15, 2023

r? @fee1-dead

(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 Jun 15, 2023
@scottmcm
Copy link
Member 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 Jun 15, 2023
@bors
Copy link
Contributor

bors commented Jun 15, 2023

⌛ Trying commit 44789b6 with merge 642b1ef2eaed49f8155bef08684b75112fbb432e...

@bors
Copy link
Contributor

bors commented Jun 15, 2023

☀️ Try build successful - checks-actions
Build commit: 642b1ef2eaed49f8155bef08684b75112fbb432e (642b1ef2eaed49f8155bef08684b75112fbb432e)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (642b1ef2eaed49f8155bef08684b75112fbb432e): 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
Regressions ❌
(secondary)
0.2% [0.2%, 0.3%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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)
- - 0
Improvements ✅
(primary)
-2.7% [-2.7%, -2.7%] 1
Improvements ✅
(secondary)
-1.8% [-1.9%, -1.7%] 2
All ❌✅ (primary) -2.7% [-2.7%, -2.7%] 1

Cycles

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

Binary size

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

Bootstrap: 648.042s -> 648.077s (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 15, 2023
@compiler-errors
Copy link
Member

👍

yeah if this isn't perf sensitive then I don't see why not

r? @compiler-errors @bors r+

@bors
Copy link
Contributor

bors commented Jun 16, 2023

📌 Commit 44789b6 has been approved by compiler-errors

It is now in the queue for this repository.

@rustbot rustbot assigned compiler-errors and unassigned fee1-dead Jun 16, 2023
@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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 16, 2023
@bors
Copy link
Contributor

bors commented Jun 16, 2023

⌛ Testing commit 44789b6 with merge 0966f32...

@bors
Copy link
Contributor

bors commented Jun 16, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 0966f32 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 16, 2023
@bors bors merged commit 0966f32 into rust-lang:master Jun 16, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 16, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0966f32): comparison URL.

Overall result: ❌ regressions - no action needed

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

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)
- - 0
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 2
All ❌✅ (primary) -0.9% [-0.9%, -0.9%] 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)
3.0% [0.9%, 6.1%] 10
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.2% [-3.9%, -2.8%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.9% [-3.9%, 6.1%] 15

Binary size

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

Bootstrap: 647.175s -> 648.963s (0.28%)

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

6 participants