-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Improve collided exception performance #100169
Merged
janvorli
merged 6 commits into
dotnet:main
from
janvorli:improve-collided-exception-performance
Mar 28, 2024
Merged
Improve collided exception performance #100169
janvorli
merged 6 commits into
dotnet:main
from
janvorli:improve-collided-exception-performance
Mar 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With the new EH enabled, one exception handling performance test has regressed while all other improved dramatically. I have investigated the test case and it turned out that the regression is due to the way we unwind during second pass when we have an exception that occured in a catch or finally funclet call chain and escaped it. What we do is that we unwind stack until we reach the parent stack frame of the catch / finally and then continue searching for handlers. The NativeAOT that the new EH is based on doesn't unwind stack though, it just moves the current stack frame iterator to the position of the previous exception's stack frame iterator by copying its state. I have applied the same mechanism to the new EH in coreclr and it improved the performance of that test 3-4 times on my machine.
/azp run runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Mar 23, 2024
janvorli
force-pushed
the
improve-collided-exception-performance
branch
from
March 25, 2024 22:43
d7b63b5
to
bc57e00
Compare
This was referenced Mar 26, 2024
janvorli
force-pushed
the
improve-collided-exception-performance
branch
from
March 26, 2024 16:38
35c8a4e
to
add6b2f
Compare
janvorli
force-pushed
the
improve-collided-exception-performance
branch
from
March 26, 2024 21:14
790fa1c
to
17dab65
Compare
/azp run runtime-coreclr outerloop |
/azp run runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-coreclr gcstress0x3-gcstress0xc outerloop |
No pipelines are associated with this pull request. |
/azp run runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
The arm gc stress issue is known - see #99410 |
jkotas
reviewed
Mar 27, 2024
jkotas
approved these changes
Mar 27, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the new EH enabled, one exception handling performance test has regressed while all other improved dramatically. I have investigated the test case and it turned out that the regression is due to the way we unwind during second pass when we have an exception that occured in a catch or finally funclet call chain and escaped it. What we do is that we unwind stack until we reach the parent stack frame of the catch / finally and then continue searching for handlers. The NativeAOT that the new EH is based on doesn't unwind stack though, it just moves the current stack frame iterator to the position of the previous exception's stack frame iterator by copying its state. I have applied the same mechanism to the new EH in coreclr and it improved the performance of that test 3-4 times on my machine.
Close #99965