Saturday, August 18, 2012 10:26 PM
I'm working on something with CLRProfiler,
I'm trying to get the passed parameter values (stack or heap) within the following callback
HRESULT ProfilerCallback::JITCompilationFinished( FunctionID functionID,...
How can I do this?
Monday, August 20, 2012 10:57 AMModerator
Welcome to the MSDN Forum.
Please take a look at this similar thread: http://social.msdn.microsoft.com/forums/en-us/netfxbcl/thread/032021A7-8473-45DD-8629-6BFBFD8B2127
You would have to use the profiling API. However even then you can't see method calls that have already happened. You would need to log each method call as it occurs for later use. There is no place in .NET where a list of methods that were called is stored. This would require a tremendous amount of memory. Using the profiling API you can monitor the calls an application makes.
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Marked As Answer by Mike FengMicrosoft Contingent Staff, Moderator Thursday, September 06, 2012 3:32 AM
Monday, August 20, 2012 11:00 PM
I think you can use the callback hooks start looking at around COR_PRF_MONITOR_ENTERLEAVE, SetFunctionIDMapper/SetFunctionIDMapper2, SetEnterLeaveFunctionHooks/SetEnterLeaveFunctionHooks2
you can then I believe start stack walking see http://blogs.msdn.com/b/davbr/archive/2005/10/06/profiler-stack-walking-basics-and-beyond.aspx