ICorProfilerCallback Interface
Provides methods that are used by the common language runtime (CLR) to notify a code profiler when the events to which the profiler has subscribed occur.
Methods
Method |
Description |
---|---|
Notifies the profiler that an application domain has been created. |
|
Notifies the profiler that an application domain is being created. |
|
Notifies the profiler that an application domain has been unloaded from a process. |
|
Notifies the profiler that an application domain is being unloaded from a process. |
|
Notifies the profiler that an assembly has finished loading. |
|
Notifies the profiler that an assembly is being loaded. |
|
Notifies the profiler that an assembly has been unloaded. |
|
Notifies the profiler that an assembly is being unloaded. |
|
Notifies the profiler that a class has finished loading. |
|
Notifies the profiler that a class is being loaded. |
|
Notifies the profiler that a class has finished unloading. |
|
Notifies the profiler that a class is being unloaded. |
|
Notifies the profiler that a runtime callable wrapper (RCW) for the specified IID and class has been created. |
|
Notifies the profiler that an RCW is being destroyed. |
|
Notifies the profiler that control is being passed to the appropriate catch block. |
|
Notifies the profiler that control is being passed out of the appropriate catch block. |
|
Obsolete in the .NET Framework version 2.0. |
|
Obsolete in the .NET Framework 2.0. |
|
Not implemented. A profiler that needs unmanaged exception information must obtain this information through other means. |
|
Not implemented. A profiler that needs unmanaged exception information must obtain this information through other means. |
|
Notifies the profiler that the search phase of exception handling has located a handler for the exception that was thrown. |
|
Notifies the profiler that a user filter is being executed. |
|
Notifies the profiler that a user filter has just finished executing. |
|
Notifies the profiler that the search phase of exception handling has entered a function. |
|
Notifies the profiler that the search phase of exception handling has finished searching a function. |
|
Notifies the profiler that an exception has been thrown. |
|
Notifies the profiler that the unwind phase of exception handling is entering a finally clause contained in the specified function. |
|
Notifies the profiler that the unwind phase of exception handling has left a finally clause. |
|
Notifies the profiler that the unwind phase of exception handling has entered a function. |
|
Notifies the profiler that the unwind phase of exception handling has finished unwinding a function. |
|
Notifies the profiler that the runtime has started to unload a function. |
|
Called to initialize the profiler whenever a new CLR application is started. |
|
ICorProfilerCallback::JITCachedFunctionSearchFinished Method |
Notifies the profiler that a search has finished for a function that was compiled previously using NGen.exe. |
Notifies the profiler that a search has started for a function that was compiled previously using NGen.exe. |
|
Notifies the profiler that the JIT compiler has finished compiling a function. |
|
Notifies the profiler that the just-in-time (JIT) compiler has started to compile a function. |
|
Notifies the profiler that a function that has been JIT-compiled has been removed from memory. |
|
Notifies the profiler that the JIT compiler is about to insert a function in line with another function. |
|
Notifies the profiler that a transition from managed code to unmanaged code has occurred. |
|
Notifies the profiler that a module is being attached to its parent assembly. |
|
Notifies the profiler that a module has finished loading. |
|
Notifies the profiler that a module is being loaded. |
|
Notifies the profiler that a module has finished unloading. |
|
Notifies the profiler that a module is being unloaded. |
|
Notifies the profiler about object references that were moved during garbage collection. |
|
Notifies the profiler that memory within the heap has been allocated for an object. |
|
Notifies the profiler about objects in memory referenced by the specified object. |
|
Notifies the profiler about the number of instances of each specified class that have been created since the previous garbage collection. |
|
ICorProfilerCallback::RemotingClientInvocationFinished Method |
Notifies the profiler that a remoting call has run to completion on the client. |
ICorProfilerCallback::RemotingClientInvocationStarted Method |
Notifies the profiler that a remoting call has started. |
Notifies the profiler that the server-side portion of a remoting call has completed and the client is now receiving and about to process the reply. |
|
Notifies the profiler that the client is sending a request to the server. |
|
ICorProfilerCallback::RemotingServerInvocationReturned Method |
Notifies the profiler that the process has finished invoking a method in response to a remote method invocation request. |
ICorProfilerCallback::RemotingServerInvocationStarted Method |
Notifies the profiler that the process is invoking a method in response to a remote method invocation request. |
Notifies the profiler that the process is receiving a remote method invocation or activation request. |
|
Notifies the profiler that the process has finished processing a remote method invocation request and is about to transmit the reply through a channel. |
|
Notifies the profiler with information about root references after garbage collection. |
|
Notifies the profiler that the runtime has resumed all runtime threads and has returned to normal operation. |
|
Notifies the profiler that the runtime is resuming all run-time threads. |
|
Notifies the profiler that the runtime has aborted the run-time suspension that was occurring. |
|
Notifies the profiler that the runtime has completed suspension of all run-time threads. |
|
Notifies the profiler that the runtime is about to suspend all run-time threads. |
|
Notifies the profiler that the specified thread has resumed after being suspended. |
|
Notifies the profiler that the specified thread has been, or is about to be, suspended. |
|
Notifies the profiler that the application is shutting down. |
|
Notifies the profiler that a managed thread is being implemented using a particular operating system (OS) thread. |
|
Notifies the profiler that a thread has been created. |
|
Notifies the profiler that a thread has been destroyed. |
|
Notifies the profiler that a transition from unmanaged code to managed code has occurred. |
Remarks
The CLR calls a method in the ICorProfilerCallback (or ICorProfilerCallback2) interface to notify the profiler when an event, to which the profiler has subscribed, occurs. This is the primary callback interface through which the CLR communicates with the code profiler.
A code profiler must implement the methods of the ICorProfilerCallback interface. For the .NET Framework version 2.0 or later, the profiler must also implement the ICorProfilerCallback2 methods. Each method implementation must return an HRESULT that has a value of S_OK on success or E_FAIL on failure. Currently, the CLR ignores the HRESULT that is returned by each callback except ICorProfilerCallback::ObjectReferences.
In the Microsoft Windows registry, a code profiler must register its Component Object Model (COM) object that implements the ICorProfilerCallback and ICorProfilerCallback2 interfaces. A code profiler subscribes to the events for which it wants to receive notification by calling ICorProfilerInfo::SetEventMask. This is usually done in the profiler's implementation of ICorProfilerCallback::Initialize. The profiler is then able to receive notification from the runtime when an event is about to occur or has just occurred in an executing runtime process.
Note
The profiler registers a single COM object. If the profiler is targeting the .NET Framework version 1.0 or 1.1, that COM object needs to implement only the methods of ICorProfilerCallback. If it is targeting .NET Framework version 2.0 or later, the COM object must also implement the methods of ICorProfilerCallback2.
Requirements
Platforms: See .NET Framework System Requirements.
Header: CorProf.idl, CorProf.h
Library: CorGuids.lib
.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0
See Also
Reference
ICorProfilerCallback2 Interface