แก้ไข

แชร์ผ่าน


ICorProfilerInfo3 Interface

Provides methods that code profilers use to communicate with the common language runtime (CLR) to control event monitoring and to request information. The ICorProfilerInfo3 interface is an extension of the ICorProfilerInfo2 interface. It provides new methods supported in the .NET Framework 4 and later versions.

Methods

Method Description
EnumJITedFunctions Method Returns an enumerator for all previously JIT-compiled functions.
EnumModules Method Returns an enumerator that provides methods to sequentially iterate through a collection of managed modules that are loaded into the application.
GetAppDomainsContainingModule Method Gets the identifiers of the application domains in which the given module has been loaded.
GetFunctionEnter3Info Method Provides the stack frame and argument information of the function that is being reported to the profiler by the FunctionEnter3WithInfo function; can be called only during the FunctionEnter3WithInfo callback.
GetFunctionLeave3Info Method Provides the stack frame and return value of the function that is being reported to the profiler by the FunctionLeave3WithInfo function function; can be called only during the FunctionLeave3WithInfo callback.
GetFunctionTailcall3Info Method Provides the stack frame of the function that is being reported to the profiler by the FunctionTailcall3WithInfo function; can be called only during the FunctionTailcall3WithInfo callback.
GetModuleInfo2 Method Given a module ID, returns the file name of the module, the ID of the module's parent assembly, and a bitmask that describes the properties of the module.
GetRuntimeInformation Method Provides version information about the runtime that is being profiled.
GetStringLayout2 Method Gets information about the layout of a string object.
GetThreadStaticAddress2 Method Gets the address of the specified thread-static field that is in the scope of the specified thread and application domain.
RequestProfilerDetach Method Instructs the runtime to detach the profiler.
SetEnterLeaveFunctionHooks3 Method Specifies the profiler-implemented functions that will be called on the FunctionEnter3, FunctionLeave3, and FunctionTailcall3 functions.
SetEnterLeaveFunctionHooks3WithInfo Method Specifies the profiler-implemented functions that will be called on the FunctionEnter3WithInfo, FunctionLeave3WithInfo, and FunctionTailcall3WithInfo hooks of managed functions.
SetFunctionIDMapper2 Method Specifies the profiler-implemented function that will be called to map FunctionID values to alternative values, which are passed to the profiler's function entry/exit hooks. This method extends ICorProfilerInfo::SetFunctionIDMapper with a parameter that profilers may use to disambiguate among runtimes.

Remarks

The CLR implements the methods of the ICorProfilerInfo3 interface by using the free-threaded model. Each method returns an HRESULT to indicate success or failure. For a list of possible return codes, see the CorError.h file.

The CLR passes an ICorProfilerInfo3 interface to each code profiler during initialization, using the profiler's implementation of the ICorProfilerCallback::Initialize or ICorProfilerCallback3::InitializeForAttach method. A code profiler can then call the ICorProfilerInfo3 methods to get information about managed code that is being executed under the control of the CLR.

Requirements

Platforms: See System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: Available since 4

See also