Uh oh!
There was an error while loading. Please reload this page.
Improve UnwindInfoTable's performance - #125545
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
75cd28d to
7358ca6CompareUh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
eduardo-vp
commented
Mar 18, 2026
Storing in a buffer and flushing with two locks actually led to better performance of the test case mentioned in #123124 (comment).
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/coreclr/vm/codeman.cpp:1
- Removal only searches the published table and ignores entries that are still in the pending buffer. If a method is unpublished before its unwind data is flushed, the pending entry can later be published to the OS (stale unwind info), and removal will incorrectly report not found. Fix by also searching/removing matching entries from the pending buffer under
s_pUnwindInfoTablePendingLock(and/or forcing a flush before attempting removal) so unpublish is correct regardless of whether the entry was already published.
// Licensed to the .NET Foundation under one or more agreements.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Uh oh!
There was an error while loading. Please reload this page.
jkotas
commented
Mar 20, 2026
What does the perf look like with the latest delta? |
eduardo-vp
commented
Mar 20, 2026
These are the results with the latest changes
|
AaronRobinsonMSFT
left a comment
There was a problem hiding this comment.
Two nits I'd personally like to see fix, but other than that, LGTM. Thanks!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eduardo-vp
commented
Mar 20, 2026
/ba-g unrelated failure |
agocke
commented
Mar 29, 2026
/backport to release/10.0 |
Started backporting to |
@agocke backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patchApplying: Batch unwind info table entriesApplying: Flush before method is done JITingApplying: Use two lockserror: sha1 information is lacking or useless (src/coreclr/vm/codeman.cpp).error: could not build fake ancestorhint: Use 'git am --show-current-patch=diff' to see the failed patchhint: When you have resolved this problem, run "git am --continue".hint: If you prefer to skip this patch, run "git am --skip" instead.hint: To restore the original branch and stop patching, run "git am --abort".hint: Disable this message with "git config set advice.mergeConflict false"Patch failed at 0003 Use two locksError: The process '/usr/bin/git' failed with exit code 128 |
agocke
commented
Mar 30, 2026
@eduardo-vp Could you port this over manually? The automation seems to be having issues. |
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>
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_FUNCTION`s. ## Customer Impact - [x] Customer reported - [ ] Found internally Regression was reported in #123124. ## Regression - [X] Yes - [ ] No ## 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. 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>
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.Contributes to #123124.