Uh oh!
There was an error while loading. Please reload this page.
[release/10.0] Improve UnwindInfoTable's performance - #126331
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>
Tagging subscribers to this area: @agocke |
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. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
@agocke Ready for review and merge? And maybe assign milestone? |
agocke
commented
Apr 22, 2026
/ba-g all failures known |
Uh oh!
There was an error while loading. Please reload this page.
Guess this should be assigned milestone 10.0.8 ? (As 10.0.7 became hotfix-version) |
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.