Reputation: 2731
Is this possible in Visual Studio to generate a text list of the methods that are being called, and possibly execution time [of returned methods]? I know about a lot of approaches to profile an application, but I think that having a clear - even if long - callstack would be helpful in improving launch performances.
Upvotes: 1
Views: 60
Reputation: 78914
Here's a code project article about this
It basically boils down to using the GetThreadContext()
to capture the context of the current thread and then using StackWalk64()
to walk the stack. Alternatively you can also use CaptureStackBackTrace()
.
These functions will only get you the list of addresses that make the stack. To get the names of the functions and line numbers you'll need to use functions from dbghelp.dll
like
SymGetModuleInfo64()
Upvotes: 1