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

rustc(codegen): uncache def_symbol_name prefix from symbol_name. #59343

Merged
merged 1 commit into from
Mar 30, 2019

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Mar 21, 2019

The def_symbol_name query was an optimization to avoid recomputing the common part of a symbol name, as only the hash needs to be added to it for each symbol.

However, #57967 will add a new mangling scheme, which doesn't readily support this kind of reuse - while it's plausible, it requires a lot more effort, since you'd have to "symbolically evaluate" mangling, and keep it in a form where the backreference positions can be computed correctly in the final step.

So I want to see how much time we're actually saving with this def_symbol_name optimization, nowadays.

cc @michaelwoerister

@rust-highfive
Copy link
Collaborator

r? @oli-obk

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 21, 2019
@eddyb
Copy link
Member Author

eddyb commented Mar 21, 2019

@bors try

@bors
Copy link
Contributor

bors commented Mar 21, 2019

⌛ Trying commit 3590a46 with merge 7172250...

bors added a commit that referenced this pull request Mar 21, 2019
rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`.

The `def_symbol_name` query was an optimization to avoid recomputing the common part of a symbol name, as only the hash needs to be added to it for each symbol.

However, #57967 will add a new mangling scheme, which doesn't readily support this kind of reuse - while it's plausible, it requires a lot more effort, since you'd have to "symbolically evaluate" mangling, and keep it in a form where the backreference positions can be computed correctly in the final step.

So I want to see how much time we're actually saving with this `def_symbol_name` optimization, nowadays.
@bors
Copy link
Contributor

bors commented Mar 21, 2019

☀️ Try build successful - checks-travis
Build commit: 7172250

@eddyb
Copy link
Member Author

eddyb commented Mar 21, 2019

@rust-timer build 7172250

@rust-timer
Copy link
Collaborator

Success: Queued 7172250 with parent 48e354d, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 7172250

@oli-obk
Copy link
Contributor

oli-obk commented Mar 22, 2019

Perf is randomly better or worse, but all below 1%. Max-rss seems to mostly have improvements, but that might just be noise, I don't know what the usual variances are.

impl lgtm

@michaelwoerister
Copy link
Member

Looks good to me, thanks for the PR, @eddyb!

@bors r+

@bors
Copy link
Contributor

bors commented Mar 25, 2019

📌 Commit 3590a46 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 Mar 25, 2019
@bors
Copy link
Contributor

bors commented Mar 26, 2019

☔ The latest upstream changes (presumably #59433) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 26, 2019
@eddyb
Copy link
Member Author

eddyb commented Mar 29, 2019

@bors r=michaelwoerister

@bors
Copy link
Contributor

bors commented Mar 29, 2019

📌 Commit 03639a2 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 29, 2019
Centril added a commit to Centril/rust that referenced this pull request Mar 30, 2019
…woerister

rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`.

The `def_symbol_name` query was an optimization to avoid recomputing the common part of a symbol name, as only the hash needs to be added to it for each symbol.

However, rust-lang#57967 will add a new mangling scheme, which doesn't readily support this kind of reuse - while it's plausible, it requires a lot more effort, since you'd have to "symbolically evaluate" mangling, and keep it in a form where the backreference positions can be computed correctly in the final step.

So I want to see how much time we're actually saving with this `def_symbol_name` optimization, nowadays.

cc @michaelwoerister
bors added a commit that referenced this pull request Mar 30, 2019
Rollup of 5 pull requests

Successful merges:

 - #59343 (rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`.)
 - #59380 (Fix invalid DWARF for enums when using ThinLTO)
 - #59463 (skip dyn keyword lint under macros)
 - #59539 (Fix infinite recursion)
 - #59544 (manifest: only include miri on the nightly channel)

Failed merges:

r? @ghost
@bors bors merged commit 03639a2 into rust-lang:master Mar 30, 2019
@eddyb eddyb deleted the rm-def-symbol-name branch March 30, 2019 18:21
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.

6 participants