-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Reduce code size of thread::set_current
#123356
Conversation
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Reduce code size of `thread::set_current` rust-lang#123265 introduced a rather large binary size regression, because it added an `unwrap()` call on a `Result<(), Thread>`, which in turn pulled its rather heavy `Debug` implementation. This PR fixes this by readding the `rtassert!` that was removed.
I think the push cancelled the try build. |
This comment has been minimized.
This comment has been minimized.
Reduce code size of `thread::set_current` rust-lang#123265 introduced a rather large binary size regression, because it added an `unwrap()` call on a `Result<(), Thread>`, which in turn pulled its rather heavy `Debug` implementation. This PR fixes this by readding the `rtassert!` that was removed.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (c38c6c9): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking 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 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)This benchmark run did not return any relevant results for this metric. 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: 666.146s -> 668.198s (0.31%) |
That is ~exactly the number of things buffed as were regressed, and by about as much. Seems to patch the original completely. Nice work! @bors r+ |
Sure, done! @bors r=workingjubilee |
@bors r- |
That just means pre-main code should not do that...? |
No, there are ways and means to get around that. We document our limitations here, |
Silently dropping this seems rather suspicious but I don't have any overview over the lifecycle of this variable. |
We normally call this in Anyway, I don't feel any particular way about this, as long as we don't |
What's the consequence of discarding it the 2nd time? Just a different thread name or anything more serious? If you change it like this IMO it should be called |
💀 what |
Sorry for the confusion, I totally derailed the conversation. The PR is now back to the approved state, with an updated abort message as Ralf suggested. |
lgtm @bors r+ rollup |
…nton Reduce code size of `thread::set_current` rust-lang#123265 introduced a rather large binary size regression, because it added an `unwrap()` call on a `Result<(), Thread>`, which in turn pulled its rather heavy `Debug` implementation. This PR fixes this by readding the `rtassert!` that was removed.
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#123356 (Reduce code size of `thread::set_current`) - rust-lang#124159 (Move thread parking to `sys::sync`) - rust-lang#124293 (Let miri and const eval execute intrinsics' fallback bodies) - rust-lang#124500 (lldb-formatters: Use StdSliceSyntheticProvider for &str) - rust-lang#124677 (Set non-leaf frame pointers on Fuchsia targets) - rust-lang#124692 (We do not coerce `&mut &mut T -> *mut mut T`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#123356 (Reduce code size of `thread::set_current`) - rust-lang#124159 (Move thread parking to `sys::sync`) - rust-lang#124293 (Let miri and const eval execute intrinsics' fallback bodies) - rust-lang#124677 (Set non-leaf frame pointers on Fuchsia targets) - rust-lang#124692 (We do not coerce `&mut &mut T -> *mut mut T`) - rust-lang#124698 (Rewrite `rustdoc-determinism` test in Rust) - rust-lang#124700 (Remove an unnecessary cast) - rust-lang#124701 (Docs: suggest `uN::checked_sub` instead of check-then-unchecked) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123356 - joboet:set_current_size, r=ChrisDenton Reduce code size of `thread::set_current` rust-lang#123265 introduced a rather large binary size regression, because it added an `unwrap()` call on a `Result<(), Thread>`, which in turn pulled its rather heavy `Debug` implementation. This PR fixes this by readding the `rtassert!` that was removed.
#123265 introduced a rather large binary size regression, because it added an
unwrap()
call on aResult<(), Thread>
, which in turn pulled its rather heavyDebug
implementation. This PR fixes this by readding thertassert!
that was removed.