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 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 #45246.
@cuviper

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Nov 18, 2019

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

This comment has been minimized.

Copy link
Contributor

bors commented Nov 18, 2019

⌛️ Trying commit a5d624d with merge cac893b...

bors added a commit that referenced this pull request Nov 18, 2019
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 #45246.
r? @michaelwoerister
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 19, 2019

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

Copy link
Contributor

michaelwoerister left a comment

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

This comment has been minimized.

Copy link
Contributor

michaelwoerister commented Nov 19, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 19, 2019

📌 Commit 4c2f1c8 has been approved by michaelwoerister

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

michaelwoerister commented Nov 19, 2019

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
4 checks passed
4 checks passed
pr #20191119.20 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@cuviper

This comment has been minimized.

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 cuviper:dwarf-aranges branch Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.