Improve UnwindInfoTable's performance#125545
Conversation
75cd28d to
7358ca6
Compare
|
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.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
What does the perf look like with the latest delta? |
|
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!
|
/ba-g unrelated failure |
|
/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.patch
Applying: Batch unwind info table entries
Applying: Flush before method is done JITing
Applying: Use two locks
error: sha1 information is lacking or useless (src/coreclr/vm/codeman.cpp).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: 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 locks
Error: The process '/usr/bin/git' failed with exit code 128 |
|
@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>
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.