-
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
Generate DWARF address ranges for faster lookups #66532
Conversation
This adds a new option `-Zgenerate-arange-section`, enabled by default, corresponding to LLVM's `-generate-arange-section`. This creates a `.debug_aranges` section with DWARF address ranges, which some tools depend on to optimize address lookups (elfutils [22288], [25173]). This only has effect when debuginfo is enabled, and the additional data is small compared to the other debug sections. For example, libstd.so with full debuginfo is about 11MB, with just 61kB in aranges. [22288]: https://sourceware.org/bugzilla/show_bug.cgi?id=22288 [25173]: https://sourceware.org/bugzilla/show_bug.cgi?id=25173 Closes rust-lang#45246.
We could of course choose a different option name, and I wasn't sure if it should be |
Seems like it should be tracked, since we presumably want to rerun codegen (and debuginfo-gen) if it changes. How is the performance side of this? We can check somewhat on perf I guess... @bors try @rust-timer queue |
⌛ Trying commit a5d624d with merge cac893b7e1ae448226feb916d342a26bb7492344... |
☀️ Try build successful - checks-azure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @cuviper! Looks good to me. Let's get this merged asap so we get some testing while still early in the current cycle.
@bors r+ |
📌 Commit 4c2f1c8 has been approved by |
Let's keep this change bisectable: |
…rister Generate DWARF address ranges for faster lookups This adds a new option `-Zgenerate-arange-section`, enabled by default, corresponding to LLVM's `-generate-arange-section`. This creates a `.debug_aranges` section with DWARF address ranges, which some tools depend on to optimize address lookups (elfutils [22288], [25173]). This only has effect when debuginfo is enabled, and the additional data is small compared to the other debug sections. For example, libstd.so with full debuginfo is about 11MB, with just 61kB in aranges. [22288]: https://sourceware.org/bugzilla/show_bug.cgi?id=22288 [25173]: https://sourceware.org/bugzilla/show_bug.cgi?id=25173 Closes rust-lang#45246. r? @michaelwoerister
Rollup of 8 pull requests Successful merges: - #65665 (Update Source Code Pro and include italics) - #66478 (rustc_plugin: Remove the compatibility shim) - #66497 (Fix #53820) - #66526 (Add more context to `async fn` trait error) - #66532 (Generate DWARF address ranges for faster lookups) - #66546 (Remove duplicate function) - #66548 ([RISCV] Disable Atomics on all Non-A RISC-V targets) - #66553 (remove HermitCore leftovers from sys/unix) Failed merges: r? @ghost
So it was rolled up anyway -- I think the bot syntax is "rollup=never". |
This adds a new option
-Zgenerate-arange-section
, enabled by default,corresponding to LLVM's
-generate-arange-section
. This creates a.debug_aranges
section with DWARF address ranges, which some toolsdepend on to optimize address lookups (elfutils 22288, 25173).
This only has effect when debuginfo is enabled, and the additional data
is small compared to the other debug sections. For example, libstd.so
with full debuginfo is about 11MB, with just 61kB in aranges.
Closes #45246.
r? @michaelwoerister