-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[cDAC] Move AMD64 Unwinder to managed code #116488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/azp run runtime-diagnostics |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
|
/azp run runtime-diagnostics |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR transitions the AMD64 unwinding logic from a static native helper call into fully managed code using the new AMD64Unwinder class.
- Added a
usingfor theAMD64Unwindernamespace. - Replaced
Unwinder.AMD64Unwind(ref this, target)with instantiation ofAMD64Unwinderand itsUnwindmethod.
Comments suppressed due to low confidence (1)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/Context/AMD64Context.cs:54
- This new managed unwinder path should be covered by unit or integration tests to ensure the behavior matches the previous native implementation under various stack scenarios.
AMD64Unwinder unwinder = new(target);
| public void Unwind(Target target) | ||
| { | ||
| Unwinder.AMD64Unwind(ref this, target); | ||
| AMD64Unwinder unwinder = new(target); |
Copilot
AI
Jun 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instantiating AMD64Unwinder on each call may introduce heap allocations in hot paths. If performance is critical, consider making AMD64Unwinder a struct or caching a single instance to minimize allocations.
|
/azp run runtime-diagnostics |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/ba-g test failures unrelated to cDAC change. Both runtime-diagnostics and CLR_Tools_Tests are passing. |
Ports the AMD64 unwinder to managed code. The cDAC uses this managed version instead of deferring to the runtime native copy.
I'm leaving the native building infra in place until the ARM64 unwinder is ported and all of the native linking can be removed.