Share via


ICorProfilerInfo Interface

Provides methods for use by code profilers to communicate with the common language runtime (CLR) to control event monitoring and request information.

Note

Each method in the ICorProfilerInfo interface returns an HRESULT to indicate success or failure. See CorError.h for a list of possible return codes.

Methods

Method

Description

ICorProfilerInfo::BeginInprocDebugging Method

Initializes in-process debugging support. This method is obsolete in the .NET Framework version 2.0.

ICorProfilerInfo::EndInprocDebugging Method

Shuts down an in-process debugging session. This method is obsolete in the .NET Framework version 2.0.

ICorProfilerInfo::ForceGC Method

Forces garbage collection to occur within the runtime.

ICorProfilerInfo::GetAppDomainInfo Method

Gets information about the specified application domain.

ICorProfilerInfo::GetAssemblyInfo Method

Gets information about the specified assembly.

ICorProfilerInfo::GetClassFromObject Method

Gets the ClassID of an

object, given its ObjectID.

ICorProfilerInfo::GetClassFromToken Method

Gets the ID of the class, given the metadata token. This method is obsolete in the .NET Framework version 2.0. Use the ICorProfilerInfo2::GetClassFromTokenAndTypeArgs method instead.

ICorProfilerInfo::GetClassIDInfo Method

Gets the parent module and the metadata token for the specified class.

ICorProfilerInfo::GetCodeInfo Method

Gets the extent of native code associated with the specified function ID. This method is obsolete. Use the ICorProfilerInfo2::GetCodeInfo2 method instead.

ICorProfilerInfo::GetCurrentThreadID Method

Gets the ID of the current thread, if it is a managed thread.

ICorProfilerInfo::GetEventMask Method

Gets the current event categories for which the profiler wants to receive event notifications from the CLR.

ICorProfilerInfo::GetFunctionFromIP Method

Maps a managed code instruction pointer to a FunctionID.

ICorProfilerInfo::GetFunctionFromToken Method

Gets the ID of a function. This method is obsolete in the .NET Framework version 2.0. Use the ICorProfilerInfo2::GetFunctionFromTokenAndTypeArgs method instead.

ICorProfilerInfo::GetFunctionInfo Method

Gets the parent class and metadata token for the specified function.

ICorProfilerInfo::GetHandleFromThread Method

Maps the ID of a thread to a Win32 thread handle.

ICorProfilerInfo::GetILFunctionBody Method

Gets a pointer to the body of a method in Microsoft intermediate language (MSIL) code, starting at its header.

ICorProfilerInfo::GetILFunctionBodyAllocator Method

Gets an interface that provides a method to allocate memory to be used for swapping out the body of a method in MSIL code.

ICorProfilerInfo::GetILToNativeMapping Method

Gets a map from MSIL offsets to native offsets for the code contained in the specified function.

ICorProfilerInfo::GetInprocInspectionInterface Method

Gets an object that can be queried for an ICorDebugProcess interface. This method is obsolete in the .NET Framework version 2.0.

ICorProfilerInfo::GetInprocInspectionIThisThread Method

Gets an object that can be queried for the ICorDebugThread interface. This method is obsolete in the .NET Framework version 2.0.

ICorProfilerInfo::GetModuleInfo Method

Given a module ID, returns the file name of the module and the ID of the module's parent assembly.

ICorProfilerInfo::GetModuleMetaData Method

Gets a metadata interface instance that maps to the specified module.

ICorProfilerInfo::GetObjectSize Method

Gets the size of a specified object.

ICorProfilerInfo::GetThreadContext Method

Gets the context identity currently associated with the specified thread.

ICorProfilerInfo::GetThreadInfo Method

Gets the current Win32 thread identity for the specified thread.

ICorProfilerInfo::GetTokenAndMetadataFromFunction Method

Gets the metadata token and an instance of the metadata interface that can be used against the token for the specified function.

ICorProfilerInfo::IsArrayClass Method

Determines whether the specified class is an array class.

ICorProfilerInfo::SetEnterLeaveFunctionHooks Method

Specifies profiler-implemented functions to be called on "enter", "leave", and "tailcall" hooks of managed functions.

ICorProfilerInfo::SetEventMask Method

Sets a value that specifies the types of events for which the profiler wants to receive notification from the CLR.

ICorProfilerInfo::SetFunctionIDMapper 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.

ICorProfilerInfo::SetFunctionReJIT Method

Not implemented. Do not use.

ICorProfilerInfo::SetILFunctionBody Method

Replaces the body of the specified function in the specified module.

ICorProfilerInfo::SetILInstrumentedCodeMap Method

Specifies how the offsets of a specified function's original MSIL map to the new offsets of the function's profiler-modified MSIL.

Remarks

A profiler calls a method in the ICorProfilerInfo interface to communicate with the CLR to control event monitoring and request information.

The methods of the ICorProfilerInfo interface are implemented by the CLR using the free-threaded model. Each method returns an HRESULT to indicate success or failure. See CorError.h for a list of possible return codes.

The CLR passes, via the profiler's implementation of ICorProfilerCallback::Initialize, an ICorProfilerInfo interface to each code profiler during initialization. A code profiler can then call methods of the ICorProfilerInfo interface to get information about managed code being executed under the control of the CLR.

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

See Also

Reference

ICorProfilerInfo2 Interface

Other Resources

Profiling Interfaces