Repository navigation
[cDAC] Reuse lookahead stack-unwind contexts - #136589
Merged
max-charlamb merged 2 commits intoNov 2, 2026
Merged
Conversation
Reuse the caller context computed while checking skipped frames and clear it when advancing the managed context or processing frame/native transitions. Verify unwind lookup reuse in the existing Wasm stack-walk test. Co-authored-by: Copilot <[email protected]> Copilot-Session: de3eab4e-b090-430a-8e30-6b204fb1519a
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Move cached caller lookup and standard unwinding into StackWalkData. Invalidate the cache through the Context setter and GetContextForUpdate for in-place mutations, leaving interpreter handling and State unchanged. Co-authored-by: Copilot <[email protected]> Copilot-Session: de3eab4e-b090-430a-8e30-6b204fb1519a
rcj1
approved these changes
Oct 30, 2026
Member
Author
|
/ba-g unrelated infra failure |
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.
Reuse the caller context already unwound while checking for skipped explicit frames, instead of unwinding the same managed frame again when advancing the stack walk.
The cached context belongs to one stack walk. Keep it while only the explicit-frame iterator advances; discard it after advancing the managed context or processing an explicit/native transition. Interpreter advancement keeps its separate virtual-unwind path.
Performance
Enumeration-only BenchmarkDotNet comparison against native DAC and the same unoptimized cDAC at
9f06f271b8aa0cbb073b2bb6f85b16da576e6eaa. Each invocation uses a fresh enumerator over an immutable full snapshot. Activation, hashing, coverage checks, and cleanup are outside timing. This does not measure copying heap contents or writing a dump.Windows x64 Hyper-V VM, AMD EPYC 7763, Release NativeAOT, SDK
11.0.100-rc.2.26504.105. Three launches, five warmups, thirty actual iterations per launch: 90 measured samples for each of 54 provider/workload/mode cases.The substantive wins are in complex/stack-heavy workloads. Simple cases have small absolute differences and VM timing variability; those should not be read as established improvements. For example, SmallSimple/Mini is
3.930 +/- 0.321 msbefore versus3.914 +/- 0.401 msafter (mean +/- standard deviation). DeepStacks/Heap is65.046 +/- 2.138 msversus41.974 +/- 2.866 ms.Note
This description was generated with GitHub Copilot.