Skip to content
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

Merged
merged 2 commits into from
Nov 20, 2019

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Nov 18, 2019

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.

Closes #45246.
r? @michaelwoerister

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.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 18, 2019
@cuviper
Copy link
Member Author

cuviper commented Nov 18, 2019

We could of course choose a different option name, and I wasn't sure if it should be TRACKED.

@Mark-Simulacrum
Copy link
Member

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

@bors
Copy link
Contributor

bors commented Nov 18, 2019

⌛ Trying commit a5d624d with merge cac893b7e1ae448226feb916d342a26bb7492344...

@bors
Copy link
Contributor

bors commented Nov 19, 2019

☀️ Try build successful - checks-azure
Build commit: cac893b7e1ae448226feb916d342a26bb7492344 (cac893b7e1ae448226feb916d342a26bb7492344)

Copy link
Member

@michaelwoerister michaelwoerister left a 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.

src/librustc/session/config.rs Outdated Show resolved Hide resolved
@michaelwoerister
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 19, 2019

📌 Commit 4c2f1c8 has been approved by michaelwoerister

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 19, 2019
@michaelwoerister
Copy link
Member

Let's keep this change bisectable:
@bors rollup never

Centril added a commit to Centril/rust that referenced this pull request Nov 20, 2019
…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
bors added a commit that referenced this pull request Nov 20, 2019
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
@bors bors merged commit 4c2f1c8 into rust-lang:master Nov 20, 2019
@cuviper
Copy link
Member Author

cuviper commented Nov 20, 2019

So it was rolled up anyway -- I think the bot syntax is "rollup=never".

@cuviper cuviper deleted the dwarf-aranges branch November 20, 2019 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider emitting DWARF aranges
5 participants