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

Pass Context as a &mut to allow to remove RefCell fields #97433

Merged
merged 1 commit into from
May 28, 2022

Conversation

GuillaumeGomez
Copy link
Member

Fixes #90323.

r? @notriddle

@GuillaumeGomez GuillaumeGomez added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-technical-debt Area: Internal cleanup work labels May 26, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 26, 2022
@GuillaumeGomez
Copy link
Member Author

Let's check perf impact.

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 26, 2022
@bors
Copy link
Contributor

bors commented May 26, 2022

⌛ Trying commit 4ae06b6c9d3fd193ba079e2354db6ab0cf3abf3a with merge 942977e8897f606274245db5bc087d364636c2f7...

@notriddle
Copy link
Contributor

How can this work if #82741 parallel rustdoc is implemented?

@GuillaumeGomez
Copy link
Member Author

It won't but they needed to be updated in any case.

@bors
Copy link
Contributor

bors commented May 26, 2022

☀️ Try build successful - checks-actions
Build commit: 942977e8897f606274245db5bc087d364636c2f7 (942977e8897f606274245db5bc087d364636c2f7)

@rust-timer
Copy link
Collaborator

Queued 942977e8897f606274245db5bc087d364636c2f7 with parent 1851f08, future comparison URL.

@camelid
Copy link
Member

camelid commented May 26, 2022

How can this work if #82741 parallel rustdoc is implemented?

It's a good point. Hopefully passing Context as &mut and removing these RefCell fields will help us clean up Context and make it easier to parallelize (and then add locking in just the places it is necessary).

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (942977e8897f606274245db5bc087d364636c2f7): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
1.1% 1.1% 3
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-0.2% -0.2% 1
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvement found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-1.9% -1.9% 1
All 😿🎉 (primary) N/A N/A 0

Cycles

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
2.3% 2.3% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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-review -S-waiting-on-perf -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 26, 2022
@GuillaumeGomez
Copy link
Member Author

It seems to be slower for a lower memory usage. Is it worth it to merge it then?

@jyn514
Copy link
Member

jyn514 commented May 27, 2022

Hold on a second, something is wrong here. All 3 regressions are in check builds, not doc. They can't be related to this change.
https://perf.rust-lang.org/compare.html?start=1851f0802e148bb7fa0bfd7dabcb7397bf371b0b&end=942977e8897f606274245db5bc087d364636c2f7&stat=instructions:u

@GuillaumeGomez
Copy link
Member Author

Hold on a second, something is wrong here. All 3 regressions are in check builds, not doc. They can't be related to this change. https://perf.rust-lang.org/compare.html?start=1851f0802e148bb7fa0bfd7dabcb7397bf371b0b&end=942977e8897f606274245db5bc087d364636c2f7&stat=instructions:u

You're right! Doc builds are mostly the same apparently.

@notriddle
Copy link
Contributor

@bors delegate+

@bors
Copy link
Contributor

bors commented May 27, 2022

✌️ @GuillaumeGomez can now approve this pull request

@GuillaumeGomez
Copy link
Member Author

I applied suggestions. Let's see if the perf check result is different this time.

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 27, 2022
@bors
Copy link
Contributor

bors commented May 27, 2022

⌛ Trying commit 6ab8edb with merge 0f677d3ec04c23ef97068ac3aa0a72820aa2cc35...

@bors
Copy link
Contributor

bors commented May 27, 2022

☀️ Try build successful - checks-actions
Build commit: 0f677d3ec04c23ef97068ac3aa0a72820aa2cc35 (0f677d3ec04c23ef97068ac3aa0a72820aa2cc35)

@rust-timer
Copy link
Collaborator

Queued 0f677d3ec04c23ef97068ac3aa0a72820aa2cc35 with parent 56fd680, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0f677d3ec04c23ef97068ac3aa0a72820aa2cc35): comparison url.

Instruction count

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

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regressions found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
2.1% 2.5% 2
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

Cycles

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
2.4% 2.4% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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-review -S-waiting-on-perf -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 28, 2022
@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 28, 2022

📌 Commit 6ab8edb has been approved by notriddle

@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 May 28, 2022
@notriddle
Copy link
Contributor

Neither of the proclaimed "max-rss regressions" are even on doc test cases, so they're probably spurrious.

@bors
Copy link
Contributor

bors commented May 28, 2022

⌛ Testing commit 6ab8edb with merge 764b861...

@bors
Copy link
Contributor

bors commented May 28, 2022

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 764b861 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 28, 2022
@bors bors merged commit 764b861 into rust-lang:master May 28, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 28, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (764b861): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvements found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-1.1% -1.1% 3
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
2.6% 3.7% 3
Regressions 😿
(secondary)
1.7% 1.7% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-1.6% -2.1% 3
All 😿🎉 (primary) 2.6% 3.7% 3

Cycles

Results
  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions 😿
(primary)
2.1% 2.1% 1
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) 2.1% 2.1% 1

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@GuillaumeGomez GuillaumeGomez deleted the rm-refcell-context branch May 28, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-technical-debt Area: Internal cleanup work C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: Pass Context as a &mut to allow to remove RefCell fields
8 participants