-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove the ThinLTO CU hack #111364
Remove the ThinLTO CU hack #111364
Conversation
This reverts rust-lang#46722, commit e0ab5d5. Since rust-lang#111167, commit 10b69dd, we are generating DWARF subprograms in a way that is meant to be more compatible with LLVM's expectations, so hopefully we don't need this workaround rewriting CUs anymore.
(rustbot has picked a reviewer for you, use r? to override) |
⌛ Trying commit 3227be0c051505d233febaf420c0c6116dacf372 with merge 67919e910983b07ebb5e26c5def1817a9079db4c... |
☀️ Try build successful - checks-actions |
If any macOS person could try that build and look for the issues that were in #46346, that would be appreciated!
|
I've tried it out a bit in a number of configurations (probably not everything possible) and can't see any issues (certainly not the ones I see in the old nightlies that have the issue from #46346), so it's at least not obviously broken as far as I can tell. (This stuff can be subtle tho, so hopefully history doesn't make me eat those words) |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (77fb0cd): 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.
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: 645.339s -> 642.167s (-0.49%) |
@cuviper: there are some significant increases in binary size, was that expected? They are mostly in optimized incremental builds, which is a configuration that doesn't get much real-world use, but we also have some
|
No, that's not expected -- this should only affect debuginfo, and even then I'm not sure that it would affect the size all that much, just no longer shuffling the CUs around. I'll see if I can reproduce that locally and see what changed. |
The number of codegen units can have a sizeable effect on binary size -- fewer CGUs resulting in smaller binaries. Not sure if that's relevant. |
Sure, but I'm only talking about DWARF CUs here. |
I could imagine that LLVM is less able to merge debuginfo with the hack removed, which results in more duplicated debuginfo? |
Do the opt-full size:linked-artifact benchmarks include debuginfo? Sounds counter-intuitive to me, if so. I guess we'll see if @cuviper is able to reproduce the problem locally before we investigate more. |
Normally they should not, apart from what debuginfo they get from the pre-compiled std. However, these 3 crates are notable for having Taking the ripgrep example, I can see it go from 29.34MiB to 30.19MiB. The runtime code/data size changed slightly:
But the debug sections show the main difference, especially pubnames, info, and line:
Yeah, that sounds plausible. I could also imagine that the former hack might have caused us to lose data, so the new change is possibly better, more complete -- but I don't know good tools for really teasing out the difference. In any case, I think increases in debuginfo size are acceptable, as long as it's not absurd. |
FWIW, I'm glad the hack has been removed 😉 I was always surprised that it apparently didn't cause trouble. |
This pulls in rust-lang/rust#111364 (released in 1.71.0) that should fix the Dwarf errors we encountered when running the firmware with gdb on lpc55. This also means we now use the sparse cargo index per default which should improve build times.
This reverts #46722, commit e0ab5d5.
Since #111167, commit 10b69dd, we are
generating DWARF subprograms in a way that is meant to be more compatible
with LLVM's expectations, so hopefully we don't need this workaround
rewriting CUs anymore.