Recommended way to get seed context for asynchronous DoStackSnapshot
-
Tuesday, May 08, 2012 1:28 PMWhat is the recommended way to get a seed context for asynchronous DoStackSnapshot calls (32-bit and 64-bit)? According to this thread (http://social.msdn.microsoft.com/Forums/en-US/netfxtoolsdev/thread/fd66add5-2a0f-4291-bcc1-83f90b6b49b8) StackWalk64 should not be used because of possible deadlocks.
- Edited by Karel ZikmundMicrosoft Employee, Moderator Thursday, May 10, 2012 4:05 AM Make the link point to en-US
All Replies
-
Thursday, May 10, 2012 4:04 AMModerator
Will this help? http://social.msdn.microsoft.com/Forums/en-US/netfxtoolsdev/thread/c1c37c3d-d059-4328-82fd-bef1758e2c94- Proposed As Answer by CrazyGhost_Von Thursday, May 10, 2012 11:32 AM
-
Thursday, May 10, 2012 8:43 AMOk, I will use RtlVirtualUnwind / RtlLookupFunctionEntry instead of DoStackSnapshot on 64 bit Windows. But on 32 bit windows?
-
Thursday, May 10, 2012 11:32 AMThe same.
Ghost,
Call me ghost for short, Thanks
To get the better answer, it should be a better question. -
Thursday, May 10, 2012 11:48 AMI think RtlVirtualUnwind is only available on x64. Am I wrong?
-
Friday, May 11, 2012 2:51 AM
Hi ICorthomas,
You can try the general definition and check the result.
Have a nice day.
Ghost,
Call me ghost for short, Thanks
To get the better answer, it should be a better question. -
Friday, July 27, 2012 4:40 PMOwner
Hi, Thomas. I believe you're correct that the Rtl* functions for unwinding are unavailable on x86. It's probably best to write your own lightweight native stackwalker on x86. Typically, you'll get fine results by doing a simple ebp-walk (this is how ETW stack events work), and can test each frame to see if it's managed via GetFunctionFromIP.
More info about mixed-mode stackwalking here: http://blogs.msdn.com/b/davbr/archive/2005/10/06/profiler-stack-walking-basics-and-beyond.aspx
Thanks,
Dave- Marked As Answer by Mike FengMicrosoft Contingent Staff, Moderator Thursday, August 09, 2012 1:41 PM

