[release/10.0] Improve UnwindInfoTable's performance#126331
Open
eduardo-vp wants to merge 1 commit intodotnet:release/10.0from
Open
[release/10.0] Improve UnwindInfoTable's performance#126331eduardo-vp wants to merge 1 commit intodotnet:release/10.0from
eduardo-vp wants to merge 1 commit intodotnet:release/10.0from
Conversation
Place the entries of UnwindInfoTable in a buffer and flush such that we amortize the cost of the operations (pRtlAddGrowableFunctionTable + pRtlDeleteGrowableFunctionTable) to create the internal table of `RUNTIME_FUNCTION`s. Contributes to dotnet#123124. --------- Co-authored-by: Eduardo Velarde <evelardepola@microsoft.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Contributor
|
Tagging subscribers to this area: @agocke |
Contributor
There was a problem hiding this comment.
Pull request overview
Backport to release/10.0 of a CoreCLR performance improvement that reduces overhead when publishing Windows x64 unwind info by buffering and batch-flushing entries to amortize growable function table operations.
Changes:
- Introduces a per-
UnwindInfoTablepending buffer andFlushPendingEntries()to batch-merge/publish unwind entries. - Splits the single unwind-info lock into separate publish vs. pending-buffer locks to reduce contention.
- Updates CRST type definitions/generated mappings and adjusts method/parameter naming for clarity.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/coreclr/vm/codeman.h | Updates UnwindInfoTable API and adds pending-buffer/flush members. |
| src/coreclr/vm/codeman.cpp | Implements buffered publishing, new lock strategy, and merge/flush logic. |
| src/coreclr/inc/CrstTypes.def | Replaces the old unwind-info CRST with publish/pending CRSTs and ordering. |
| src/coreclr/inc/crsttypes_generated.h | Regenerates CRST enum/name/level maps for the new lock types. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of #125545 to release/10.0
Place the entries of UnwindInfoTable in a buffer and flush such that we amortize the cost of the operations (pRtlAddGrowableFunctionTable + pRtlDeleteGrowableFunctionTable) to create the internal table of
RUNTIME_FUNCTIONs.Customer Impact
Regression was reported in #123124.
Regression
Testing
Tested with the following test case in #123124 (comment) and execution time was reduced in 50%. Also, all tests in CI passed.
Risk
Medium. The change affects x64 windows programs and the changes are not trivial.