-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 a new helper to avoid calling io::Error::kind #115228
Conversation
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
Oh this is great stuff. @bors r+ rollup=never |
📌 Commit 6ba95da3f05166e85a482b98a1c2fe2bc1f2d5ee has been approved by It is now in the queue for this repository. |
This comment has been minimized.
This comment has been minimized.
6ba95da
to
d3349bf
Compare
@bors r=thomcc rollup=never |
📌 Commit d3349bf746bc85b43e57022f954df999cd1ce4c6 has been approved by It is now in the queue for this repository. |
d3349bf
to
856e9bd
Compare
Once more, with feeling |
📌 Commit 856e9bd7e240878be424eddbf709573e097557d5 has been approved by It is now in the queue for this repository. |
⌛ Testing commit 856e9bd7e240878be424eddbf709573e097557d5 with merge e0e7bdebacb381de3e21642625b50a3923052a67... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
856e9bd
to
1abaf40
Compare
And again |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9334ec9): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResultsThis 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.
Bootstrap: 631.447s -> 631.911s (0.07%) |
…thomcc fix(sys/hermit): add is_interrupted rust-lang#115228 broke compilation for Hermit by not adding a Hermit implementation of is_interrupted.
fix(sys/hermit): add is_interrupted rust-lang/rust#115228 broke compilation for Hermit by not adding a Hermit implementation of is_interrupted.
…upted, r=cuviper kmc-solid: Fix `is_interrupted` Follow-up to rust-lang#115228. Fixes a build error in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets. ``` error[E0603]: function `is_interrupted` is private --> library\std\src\sys\solid\mod.rs:77:12 | 77 | error::is_interrupted(code) | ^^^^^^^^^^^^^^ private function | note: the function `is_interrupted` is defined here --> library\std\src\sys\solid\error.rs:35:1 | 35 | fn is_interrupted(er: abi::ER) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
…upted, r=cuviper kmc-solid: Fix `is_interrupted` Follow-up to rust-lang#115228. Fixes a build error in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets. ``` error[E0603]: function `is_interrupted` is private --> library\std\src\sys\solid\mod.rs:77:12 | 77 | error::is_interrupted(code) | ^^^^^^^^^^^^^^ private function | note: the function `is_interrupted` is defined here --> library\std\src\sys\solid\error.rs:35:1 | 35 | fn is_interrupted(er: abi::ER) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
…upted, r=cuviper kmc-solid: Fix `is_interrupted` Follow-up to rust-lang#115228. Fixes a build error in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets. ``` error[E0603]: function `is_interrupted` is private --> library\std\src\sys\solid\mod.rs:77:12 | 77 | error::is_interrupted(code) | ^^^^^^^^^^^^^^ private function | note: the function `is_interrupted` is defined here --> library\std\src\sys\solid\error.rs:35:1 | 35 | fn is_interrupted(er: abi::ER) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
Tiny regression, significance factor 1.63, looks spurious to me. |
Use std::io::Error::is_interrupted everywhere In rust-lang#115228 I introduced this helper and started using it, this PR uses it to replace all applicable uses of `std::io::Error::kind`. The justification is the same; for whatever reason LLVM totally flops optimizing `Error::kind` so it's nice to use it less. FYI ``@mkroening`` I swear the hermit changes look good, but I was so sure about the previous PR.
On
cfg(unix)
,Error::kind
emits an enormous jump table that LLVM seems unable to optimize out. I don't really understand why, but see for yourself: https://godbolt.org/z/17hY496KGThis change lets us check for
ErrorKind::Interrupted
without going through a big match. I've checked the codegen locally, and it has the desired effect on the codegen forBufReader::read_exact
.