Skip to content

Revert of #79968 to test perf regression in #80867 #80947

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

Closed
wants to merge 1 commit into from

Conversation

rylev
Copy link
Member

@rylev rylev commented Jan 12, 2021

DO NOT MERGE

Revert "Rollup merge of #79968 - bjorn3:better_drop_glue_debuginfo, r=matthewjasper"

This is a revert of #79968 to test whether it was responsible for performance regressions in the rollup #80867.

This reverts commit f90c7f0, reversing
changes made to 5c0f5b6.

r? @ghost

…uginfo, r=matthewjasper"

This reverts commit f90c7f0, reversing
changes made to 5c0f5b6.
@rylev
Copy link
Member Author

rylev commented Jan 12, 2021

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@bors
Copy link
Collaborator

bors commented Jan 12, 2021

⌛ Trying commit 26be83b with merge 3fb3412359cce85c7e01cdbcee536cfbbbfec74e...

@bors
Copy link
Collaborator

bors commented Jan 12, 2021

☀️ Try build successful - checks-actions
Build commit: 3fb3412359cce85c7e01cdbcee536cfbbbfec74e (3fb3412359cce85c7e01cdbcee536cfbbbfec74e)

@rust-timer
Copy link
Collaborator

Queued 3fb3412359cce85c7e01cdbcee536cfbbbfec74e with parent fc9944f, future comparison URL.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 12, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (3fb3412359cce85c7e01cdbcee536cfbbbfec74e): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jan 12, 2021
@bjorn3
Copy link
Member

bjorn3 commented Jan 12, 2021

#79968 was indeed the cause of the perf regression. Interestingly, LLVM optimizations are what slowed down and not the linker invocation as I expected.

@Mark-Simulacrum
Copy link
Member

I think this is pretty expected? There's probably slightly more work for LLVM/codegen to do as there's more functions and with longer names/debug info attached.

@bjorn3
Copy link
Member

bjorn3 commented Jan 12, 2021

There should be exactly as much functions, just with a longer symbol name in some cases.

@rylev
Copy link
Member Author

rylev commented Jan 13, 2021

@bjorn3 what's your opinion on whether the change is worth the perf hit? I'm assuming there's not much we can do to gain that performance back since the desired change is exactly the reason for the slowdown in codegen.

1% is certainly a non-trivial perf hit albeit the lowest amount we usually register as an actual perf regression. I don't have good insight into the amount of utility of having the dropped type's name in the debug output for drop_in_place.

@bjorn3
Copy link
Member

bjorn3 commented Jan 13, 2021

I'm assuming there's not much we can do to gain that performance back since the desired change is exactly the reason for the slowdown in codegen.

Yeah, this is LLVM getting slower, not any code we control.

1% is certainly a non-trivial perf hit albeit the lowest amount we usually register as an actual perf regression. I don't have good insight into the amount of utility of having the dropped type's name in the debug output for drop_in_place.

I agree that the perf hit is unfortunate. I do think that this is a useful change. The whole reason to have -Zsymbol-mangling-scheme=v0 is to add the generic parameters for all functions. drop_in_place is a special case where previously the symbol name was completely useless, but -Zsymbol-mangling-scheme=v0 will have an even bigger perf hit. It may be nice to get a perf run for -Zsymbol-mangling-scheme=v0 I guess.

@nagisa
Copy link
Member

nagisa commented Jan 13, 2021

On one hand nice and useful symbol names help debugging and have benefits in some other use-cases. On the other hand most of the users likely don't care about them at all and would likely rather if, by default, they were unreadable but resulted in faster compile and link times.

Now, the goal of the mangling schemes we utilized so far has always been to provide utility and performance implications were never of much importance in this particular area, so I suggest we continue to focus on utility for the schemes that we currently have. And then a mangling scheme better suited for faster compiles could be considered and implemented as a separate proposal.

@rylev
Copy link
Member Author

rylev commented Jan 14, 2021

I'm going to close this as it seems that the consensus is that the performance degradation is worth getting the better debugging output.

@rylev rylev closed this Jan 14, 2021
@rylev rylev deleted the revert-79968 branch January 14, 2021 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants