-
Notifications
You must be signed in to change notification settings - Fork 199
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
Fix unwind info generation for EH funclets #1923
Fix unwind info generation for EH funclets #1923
Conversation
@cshung @BruceForstall PTAL. Since this touches |
I re-measured some hot/cold splitting metrics on SuperPMI's benchmarks, libraries, and aspnet collections: There are slight reductions in total functions and functions with EH split (due to us not splitting in the funclet section anymore), but metrics are largely the same. Benchmarks:
Libraries:
ASP.NET (has some PGO data):
|
Judging from the output, it appears that while we have the right number of calls, the unwind info for cold funclet is missing? In particular, all the calls to |
Thanks for catching that; just pushed a fix. Here's what the Function with no splitting, plus hot EH:
Function with main body split, plus cold EH:
Function with main body NOT split, plus cold EH:
|
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.
The outputs look good to me.
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.
I'm late to this, but the changes look good
This PR addresses the second task in #1918 by fixing unwind info generation for EH funclets in the JIT on x64. Additionally, a bug was found in
fgDetermineFirstColdBlock
where a block afterfgFirstFuncletBB
could be selected as a candidate forfgFirstColdBlock
, potentially splitting the funclet section; this has been fixed by adding some additional logic to short-circuit the search if we reach the first funclet block.Note that these changes apply specifically to x64; at some point, similar changes will be needed for ARM64, etc. I can do this work in a follow-up PR.
Below are some examples of unwind info generation for functions with EH, collected from various JIT dumps:
Function with no splitting, plus hot EH funclets:
Function with main body split, plus cold EH funclets:
Function with main body NOT split, plus cold EH funclets: