Uh oh!
There was an error while loading. Please reload this page.
Add default trait implementations for "c-unwind" ABI function pointers - #101263
Conversation
rust-highfive
commented
Sep 1, 2022
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
it looks like I need to bless changes to the UI tests. Let me try and figure out how to do that 😄 Edit: done! |
RalfJung
commented
Sep 1, 2022
@bors try @rust-timer queue |
rust-timer
commented
Sep 1, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Sep 1, 2022
⌛ Trying commit 2f7cc2d574b203e1f19b63ee705fe217fefc31ee with merge c97600b8b2ec5ef84e1426b75f8be57bf5450712... |
bors
commented
Sep 1, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Sep 1, 2022
Queued c97600b8b2ec5ef84e1426b75f8be57bf5450712 with parent aa857eb, future comparison URL. |
rust-timer
commented
Sep 1, 2022
Finished benchmarking commit (c97600b8b2ec5ef84e1426b75f8be57bf5450712): comparison URL. Overall result: ❌✅ regressions and improvements - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @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)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.
CyclesResultsThis 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.
Footnotes |
RalfJung
commented
Sep 1, 2022
Yeah, as expected that extra metadata in the rlib makes everything measurably slower. Not sure if there is a way that we can avoid some of these instances (do we really need all the traits here), but in the end it boils down to judging whether that's a cost we are willing to accept for the benefit of #74990. Sounds like a @rust-lang/compiler question to me. |
pnkfelix
commented
Sep 8, 2022
Discussed in T-compiler triage meeting. I think we should move forward with this, despite the performance hit. I don't want to block c-unwind based on the performance regression observed above. (If it turns out that the performance impact matters, then we can adopt other approaches, such as the one suggested in #99531; though I'm hoping that will not be necessary solely for this issue.) @rustbot label: -I-compiler-nominated |
pnkfelix
commented
Sep 8, 2022
(also, as a side note: the primary benchmarks only regressed on "doc full" scenarios. Normal compilation (check/debug/opt) all came out looking great I would say.) @rustbot label: +perf-regression-triaged |
lopopolo
commented
Sep 8, 2022
@RalfJung Given the above triage on the perf regression from the compiler team, what are the next steps for getting this approved and merged? |
RalfJung
commented
Sep 8, 2022
It needs someone from t-libs to review and approve. |
thomcc
left a comment
There was a problem hiding this comment.
Impl looks fine, I think this needs libs-api signoff, or perhaps an ACP.
Following up on #92964, only add default trait implementations for the `c-unwind` family of function pointers. The previous attempt in #92964 added trait implementations for many more ABIs and ran into concerns regarding the increase in size of the libcore rlib. An attempt to abstract away function pointer types behind a unified trait to reduce the duplication of trait impls is being discussed in #99531 but this change looks to be blocked on a lang MCP. Following @RalfJung's suggestion in #99531 (comment), this commit is another cut at #92964 but it _only_ adds the impls for `extern "C-unwind" fn` and `unsafe extern "C-unwind" fn`. I am interested in landing this patch to unblock the stabilization of the `c_unwind` feature. RFC: rust-lang/rfcs#2945 Tracking Issue: #74990
This comment was marked as outdated.
This comment was marked as outdated.
lopopolo
commented
Oct 20, 2022
I couldn't figure out the right combination of |
Looks like the build still fails with |
This comment has been minimized.
This comment has been minimized.
Oh. :( Yeah. I suppose you could apply |
These need to wait until #103239 makes it into the bootstrap compiler.
lopopolo
commented
Oct 20, 2022
thomcc
commented
Oct 20, 2022
LGTM, thanks. @bors r+ |
bors
commented
Oct 20, 2022
bors
commented
Oct 21, 2022
bors
commented
Oct 21, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Oct 22, 2022
Finished benchmarking commit (5c8bff7): comparison URL. Overall result: ❌ regressions - 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.
CyclesResultsThis 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.
Footnotes |
nnethercote
commented
Oct 22, 2022
It's all doc perf regressions, and was decided earlier to be acceptable. @rustbot label: +perf-regression-triaged |
Following up on #92964, only add default trait implementations for the
c-unwindfamily of function pointers. The previous attempt in #92964 added trait implementations for many more ABIs and ran into concerns regarding the increase in size of the libcore rlib.An attempt to abstract away function pointer types behind a unified trait to reduce the duplication of trait impls is being discussed in #99531 but this change looks to be blocked on a lang MCP.
Following @RalfJung's suggestion in #99531 (comment), this commit is another cut at #92964 but it only adds the impls for
extern "C-unwind" fnandunsafe extern "C-unwind" fn.I am interested in landing this patch to unblock the stabilization of the
c_unwindfeature.RFC: rust-lang/rfcs#2945
Tracking Issue: #74990