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

Rollup of 9 pull requests #119767

Merged
merged 26 commits into from
Jan 9, 2024
Merged

Rollup of 9 pull requests #119767

merged 26 commits into from
Jan 9, 2024

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

devnexen and others added 26 commits December 8, 2023 15:26
it is in the libcs' crate too now.
Add `E0796` error code.
Add `static_mut_ref` lint.

This is the idea for the 2024 edition.
Map is implemented as a pointer to a mutable object.
Rustdoc never mutates function signatures after constructing them,
but the JS engine doesn't know that.

To save a bunch of memory, use a single immutable map
for every decoded type object with no bindings or generics.
It was added in rust-lang#54232. It seems like it was aimed at NLL development,
which is well in the past. Also, it looks like `-Ztreat-err-as-bug` can
be used to achieve the same effect. So it doesn't seem necessary.
This takes advantage of more reuse opportunities.
Along with the empty object commit, they
bringing memory usage down about 20% over the original.
LLVM 11 has been unsupported since 4559140,
so this doesn't need to be conditional on the LLVM version.
…twco

Disallow reference to `static mut` and adding `static_mut_ref` lint

Closes rust-lang#114447

r? `@scottmcm`
…ilstrieb,dtolnay

std: getrandom simplification for freebsd.

it is in the libcs' crate too now.
…c, r=JohnTitor

Rework and improve the unstable documentation of check-cfg

This PR rework and improve the unstable documentation of the check-cfg feature.

The goal is to have a simpler to understand documentation with examples that are more practical and less theoretical. As well as making the documentation more explicit about the whereabouts of the feature.

`@rustbot` label  T-compiler  F-check-cfg
don't reexport atomic::ordering via rustc_data_structures, use std import

This looks simpler.
Simplify implementation of MIR promotion

Non-functional changes.
Best read ignoring whitespace.
…li-obk

Merge dead bb pruning and unreachable bb deduplication.

Both routines share the same basic structure: iterate on all bbs to identify work, and then renumber bbs.

We can do both at once.
…stics, r=compiler-errors

Remove `-Zdont-buffer-diagnostics`.

It was added in rust-lang#54232. It seems like it was aimed at NLL development, which is well in the past. Also, it looks like `-Ztreat-err-as-bug` can be used to achieve the same effect. So it doesn't seem necessary.

r? ``@pnkfelix``
…uillaumeGomez

rustdoc-search: reuse individual types in function signatures

Because `search.js` never mutates the function signature after loading it,
they can be safely and easily reused across functions.

This change doesn't change the format of the search index.
It only changes `search.js`.

Profiler output: https://notriddle.com/rustdoc-html-demo-9/fn-signature-opti2/index.html

<table><tr><th>benchmark<th>before<th>after

<tr><th>arti<td>

```
user: 002.228 s
sys:  000.315 s
wall: 001.663 s
child_RSS_high:     315668 KiB
group_mem_high:     288638 KiB
```

<td>

```
user: 001.805 s
sys:  000.231 s
wall: 001.398 s
child_RSS_high:     235864 KiB
group_mem_high:     203056 KiB
```

<tr><th>cortex-m<td>

```
user: 000.143 s
sys:  000.035 s
wall: 000.140 s
child_RSS_high:      59168 KiB
group_mem_high:      23000 KiB
```

<td>

```
user: 000.138 s
sys:  000.031 s
wall: 000.133 s
child_RSS_high:      58944 KiB
group_mem_high:      22220 KiB
```

<tr><th>sqlx<td>

```
user: 000.792 s
sys:  000.115 s
wall: 000.536 s
child_RSS_high:     156716 KiB
group_mem_high:     122948 KiB
```

<td>

```
user: 000.824 s
sys:  000.084 s
wall: 000.535 s
child_RSS_high:     136668 KiB
group_mem_high:     101792 KiB
```

<tr><th>stm32f4<td>

```
user: 006.665 s
sys:  003.533 s
wall: 008.624 s
child_RSS_high:    1037660 KiB
group_mem_high:    1022516 KiB
```

<td>

```
user: 005.997 s
sys:  003.185 s
wall: 007.987 s
child_RSS_high:     832068 KiB
group_mem_high:     810908 KiB
```

<tr><th>stm32f4xx-hal<td>

```
user: 000.317 s
sys:  000.051 s
wall: 000.203 s
child_RSS_high:      77060 KiB
group_mem_high:      41776 KiB
```

<td>

```
user: 000.287 s
sys:  000.046 s
wall: 000.180 s
child_RSS_high:      75216 KiB
group_mem_high:      39200 KiB
```

<tr><th>ripgrep<td>

```
user: 000.463 s
sys:  000.063 s
wall: 000.295 s
child_RSS_high:     101288 KiB
group_mem_high:      66364 KiB
```

<td>

```
user: 000.472 s
sys:  000.036 s
wall: 000.247 s
child_RSS_high:      82708 KiB
group_mem_high:      47056 KiB
```

</tr></table>
GNU/Hurd: unconditionally use inline stack probes

LLVM 11 has been unsupported since 4559140, so this doesn't need to be conditional on the LLVM version.

cc `@sthibaul`
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) O-unix Operating system: Unix-like 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 Jan 9, 2024
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 9, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r p=5 rollup=never

@bors
Copy link
Contributor

bors commented Jan 9, 2024

📌 Commit f41d773 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Jan 9, 2024
@bors
Copy link
Contributor

bors commented Jan 9, 2024

⌛ Testing commit f41d773 with merge 13edaa3...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2024
…llaumeGomez

Rollup of 9 pull requests

Successful merges:

 - rust-lang#117556 (Disallow reference to `static mut` and adding `static_mut_ref` lint)
 - rust-lang#118748 (std: getrandom simplification for freebsd.)
 - rust-lang#119282 (Rework and improve the unstable documentation of check-cfg)
 - rust-lang#119527 (don't reexport atomic::ordering via rustc_data_structures, use std import)
 - rust-lang#119668 (Simplify implementation of MIR promotion)
 - rust-lang#119699 (Merge dead bb pruning and unreachable bb deduplication.)
 - rust-lang#119723 (Remove `-Zdont-buffer-diagnostics`.)
 - rust-lang#119756 (rustdoc-search: reuse individual types in function signatures)
 - rust-lang#119758 (GNU/Hurd: unconditionally use inline stack probes)

r? `@ghost`
`@rustbot` modify labels: rollup
@GuillaumeGomez
Copy link
Member Author

CI didn't start because of a github CI incident. Let's put it as retry once it will fail.

@bors retry

@bors
Copy link
Contributor

bors commented Jan 9, 2024

⌛ Testing commit f41d773 with merge 5876c8c...

@bors
Copy link
Contributor

bors commented Jan 9, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 5876c8c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 9, 2024
@bors bors merged commit 5876c8c into rust-lang:master Jan 9, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 9, 2024
@GuillaumeGomez GuillaumeGomez deleted the rollup-fbp26yb branch January 9, 2024 16:48
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#117556 Disallow reference to static mut and adding `static_mut_r… 73eda2bc88b5db5b1f0615beee76394e30714434 (link)
#118748 std: getrandom simplification for freebsd. dde47910cd90d1cc4ad9dddc201f34085382a30d (link)
#119282 Rework and improve the unstable documentation of check-cfg 6fe1b327be3bda839365614b3f1f5928885257fb (link)
#119527 don't reexport atomic::ordering via rustc_data_structures, … d50fcda3c98d62920eef7003fdd00b9b2a451ce5 (link)
#119668 Simplify implementation of MIR promotion 0a2d24652ad853bc2cfa7a65a59d8397c26ca88c (link)
#119699 Merge dead bb pruning and unreachable bb deduplication. ce28c0c086d6f36f9d198efb385ebd7d820610f5 (link)
#119723 Remove -Zdont-buffer-diagnostics. e099b77dfbddc228f58cae9bccff8d09c5611074 (link)
#119756 rustdoc-search: reuse individual types in function signatur… 64a5b698e697d7b31e858a41f3625eb1a0865888 (link)
#119758 GNU/Hurd: unconditionally use inline stack probes 221426a584292abe1d5d25c54c20ecfb6ba96e11 (link)

previous master: be00c5a9b8

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5876c8c): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: perf-regression
cc @rust-lang/wg-compiler-performance

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)
1.3% [0.4%, 2.3%] 2
Regressions ❌
(secondary)
0.9% [0.5%, 1.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) 1.3% [0.4%, 2.3%] 2

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.9% [0.5%, 1.4%] 2
Regressions ❌
(secondary)
2.0% [1.6%, 2.4%] 2
Improvements ✅
(primary)
-1.8% [-4.4%, -0.5%] 3
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
All ❌✅ (primary) -0.7% [-4.4%, 1.4%] 5

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: 669.477s -> 668.692s (-0.12%)
Artifact size: 308.51 MiB -> 308.48 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Jan 9, 2024
@pnkfelix
Copy link
Member

  • primary regressions: syn opt-full regressed by 2.3%, bitmaps check-incr-full by 0.35%. secondary regressions: coercions debug-full by 1.23%, ctfe-stress check-full by 0.51%
  • from the overall history, it seems like syn opt-full returned to "normal" with later PRs that don't necessarily seem like they would have affected syn (e.g. PR Avoid silencing relevant follow-up errors #117449). bitmap check-incr-full's trend is likewise downward after this point.
  • marking as triaged

@rustbot label: perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jan 16, 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) merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. 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.

None yet