Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rollup of 6 pull requests #103513

Merged
merged 19 commits into from
Oct 25, 2022
Merged

Rollup of 6 pull requests #103513

merged 19 commits into from
Oct 25, 2022

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Kixiron and others added 19 commits June 17, 2022 11:54
This is the first (known) step towards starting to use `unix_sigpipe` in
the wild. Eventually, `rustc_driver::set_sigpipe_handler` can be removed
and all clients can use `unix_sigpipe` instead.

For now we just start using `unix_sigpipe` in once place: `rustc`
itself.

It is easy to manually verify this change. If you remove
`#[unix_sigpipe = "sig_dfl"]` and run `./x.py build` you will get an ICE
when you do `./build/x86_64-unknown-linux-gnu/stage1/bin/rustc --help |
false`. Add back `#[unix_sigpipe = "sig_dfl"]` and the ICE disappears
again.
These targets have system limits on the thread names, 16 and 64 bytes
respectively, and `pthread_setname_np` returns an error if the name is
longer. However, we're not in a context that can propagate errors when
we call this, and we used to implicitly truncate on Linux with `prctl`,
so now we manually truncate these names ahead of time.
Ensure:
- builders always have a `bx` suffix;
- backend basic blocks always have an `llbb` suffix,
- paired builders and basic blocks have consistent prefixes.
`TerminatorCodegenHelper` has three methods `llblock`, `llbb`, and
`lltarget`. They're all similar, but the names given no indication of
the differences.

This commit renames `lltarget` as `llbb_with_landing_pad`, and `llblock`
as `llbb_with_cleanup`. These aren't fantastic names, but at least it's
now clear that `llbb` is the lowest-level of the three and the other two
wrap it.
- Rearrange the match in `llbb_with_landing_pad` so the `(Some,Some)`
  cases are together.
- Add assertions to indicate two MSVC-only paths.
It has a single call site.
It's only ever used with shift operators.
Stabilize `Option::unzip()`

Stabilizes `Option::unzip()`, closes rust-lang#87800

```@rustbot``` modify labels: +T-libs-api
…h726

rustc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`

This is the first (known) step towards starting to use `unix_sigpipe` in the wild. Eventually, `rustc_driver::set_sigpipe_handler` can be removed and all clients can use `unix_sigpipe` instead.

For now we just start using `unix_sigpipe` in one place: `rustc` itself.

It is easy to manually verify this change. If you remove `#[unix_sigpipe = "sig_dfl"]` and run `./x.py build` you will get an ICE when you do `./build/x86_64-unknown-linux-gnu/stage1/bin/rustc --help | false`. Add back `#[unix_sigpipe = "sig_dfl"]` and the ICE disappears again.

PR that added `set_sigpipe_handler`: rust-lang#49606

Tracking issue for `unix_sigpipe`: rust-lang#97889

Not sure exactly how to label this PR. Going with T-libs for now since this is a T-libs feature.

````@rustdoc```` labels +T-libs
Remove misc_cast and validate types when casting

Continuing our work in rust-lang#102675

r? ````@oli-obk````
…omcc

Truncate thread names on Linux and Apple targets

These targets have system limits on the thread names, 16 and 64 bytes
respectively, and `pthread_setname_np` returns an error if the name is
longer. However, we're not in a context that can propagate errors when
we call this, and we used to implicitly truncate on Linux with `prctl`,
so now we manually truncate these names ahead of time.

r? ``````@thomcc``````
Clairify Vec::capacity docs

Update both the text and example to be clear that the method gives *total*, (not *spare*) capacity

Fixes rust-lang#103326
Codegen tweaks

Best reviewed one commit at a time.

r? `@bjorn3`
@rustbot rustbot added 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. rollup A PR which is a rollup labels Oct 25, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Oct 25, 2022

📌 Commit 6aea54c has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 25, 2022
@bors
Copy link
Contributor

bors commented Oct 25, 2022

⌛ Testing commit 6aea54c with merge c6bd7e2...

@bors
Copy link
Contributor

bors commented Oct 25, 2022

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing c6bd7e2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 25, 2022
@bors bors merged commit c6bd7e2 into rust-lang:master Oct 25, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 25, 2022
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#103511 042b1a468cdb4608ca05769fcf17da774a6cfa4d
#103482 17ee7a35294c83d564912ef5fc451b88a5a12ae5
#103379 97f30e10b0389c814df32e0b3b4ea305e525103b
#103122 14eb89a056ef1f72eaf0ed967bb17924d8882401
#102587 815a477ed5559e4dc44492b8512f0474062c9cde
#98204 ee370a0378d0dcbeaf6d16fca6ccc6eca8ee7209

previous master: 31d754a1df

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

@Dylan-DPC Dylan-DPC deleted the rollup-nn3ite2 branch October 25, 2022 13:46
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c6bd7e2): comparison URL.

Overall result: ✅ improvements - 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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 2
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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.1% [3.6%, 4.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#98204 (Stabilize `Option::unzip()`)
 - rust-lang#102587 (rustc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`)
 - rust-lang#103122 (Remove misc_cast and validate types when casting)
 - rust-lang#103379 (Truncate thread names on Linux and Apple targets)
 - rust-lang#103482 (Clairify Vec::capacity docs)
 - rust-lang#103511 (Codegen tweaks)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants