COR_PRF_MONITOR Enumeration

 

Contains values that are used to specify behavior, capabilities, or events to which the profiler wishes to subscribe.

  
typedef enum {  
    COR_PRF_MONITOR_NONE                = 0x00000000,  
    COR_PRF_MONITOR_FUNCTION_UNLOADS    = 0x00000001,  
    COR_PRF_MONITOR_CLASS_LOADS         = 0x00000002,  
    COR_PRF_MONITOR_MODULE_LOADS        = 0x00000004,  
    COR_PRF_MONITOR_ASSEMBLY_LOADS      = 0x00000008,  
    COR_PRF_MONITOR_APPDOMAIN_LOADS     = 0x00000010,  
    COR_PRF_MONITOR_JIT_COMPILATION     = 0x00000020,  
    COR_PRF_MONITOR_EXCEPTIONS          = 0x00000040,  
    COR_PRF_MONITOR_GC                  = 0x00000080,  
    COR_PRF_MONITOR_OBJECT_ALLOCATED    = 0x00000100,  
    COR_PRF_MONITOR_THREADS             = 0x00000200,  
    COR_PRF_MONITOR_REMOTING            = 0x00000400,  
    COR_PRF_MONITOR_CODE_TRANSITIONS    = 0x00000800,  
    COR_PRF_MONITOR_ENTERLEAVE          = 0x00001000,  
    COR_PRF_MONITOR_CCW                 = 0x00002000,  
    COR_PRF_MONITOR_REMOTING_COOKIE     = 0x00004000 |   
                                          COR_PRF_MONITOR_REMOTING,  
    COR_PRF_MONITOR_REMOTING_ASYNC      = 0x00008000 |   
                                          COR_PRF_MONITOR_REMOTING,  
    COR_PRF_MONITOR_SUSPENDS            = 0x00010000,  
    COR_PRF_MONITOR_CACHE_SEARCHES      = 0x00020000,  
    COR_PRF_ENABLE_REJIT                = 0x00040000,  
    COR_PRF_ENABLE_INPROC_DEBUGGING     = 0x00080000,  
    COR_PRF_ENABLE_JIT_MAPS             = 0x00100000,  
    COR_PRF_DISABLE_INLINING            = 0x00200000,  
    COR_PRF_DISABLE_OPTIMIZATIONS       = 0x00400000,  
    COR_PRF_ENABLE_OBJECT_ALLOCATED     = 0x00800000,  
    COR_PRF_MONITOR_CLR_EXCEPTIONS      = 0x01000000,  
    COR_PRF_MONITOR_ALL                 = 0x0107FFFF,  
    COR_PRF_ENABLE_FUNCTION_ARGS        = 0X02000000,  
    COR_PRF_ENABLE_FUNCTION_RETVAL      = 0X04000000,  
    COR_PRF_ENABLE_FRAME_INFO           = 0X08000000,  
    COR_PRF_ENABLE_STACK_SNAPSHOT       = 0X10000000,  
    COR_PRF_USE_PROFILE_IMAGES          = 0x20000000,  
    COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST  
                                        = 0x40000000,  
    COR_PRF_DISABLE_ALL_NGEN_IMAGES     = 0x80000000,  
    COR_PRF_ALL                         = 0x8FFFFFFF,  
    COR_PRF_REQUIRE_PROFILE_IMAGE       = COR_PRF_USE_PROFILE_IMAGES |   
                                          COR_PRF_MONITOR_CODE_TRANSITIONS |   
                                          COR_PRF_MONITOR_ENTERLEAVE,  
    COR_PRF_ALLOWABLE_AFTER_ATTACH      = COR_PRF_MONITOR_THREADS |  
                                          COR_PRF_MONITOR_MODULE_LOADS |  
                                          COR_PRF_MONITOR_ASSEMBLY_LOADS |  
                                          COR_PRF_MONITOR_APPDOMAIN_LOADS |  
                                          COR_PRF_ENABLE_STACK_SNAPSHOT |  
                                          COR_PRF_MONITOR_GC |  
                                          COR_PRF_MONITOR_SUSPENDS |  
                                          COR_PRF_MONITOR_CLASS_LOADS |  
                                          COR_PRF_MONITOR_JIT_COMPILATION,  
    COR_PRF_MONITOR_IMMUTABLE           = COR_PRF_MONITOR_CODE_TRANSITIONS |  
                                          COR_PRF_MONITOR_REMOTING |  
                                          COR_PRF_MONITOR_REMOTING_COOKIE |  
                                          COR_PRF_MONITOR_REMOTING_ASYNC |  
                                          COR_PRF_ENABLE_REJIT |  
                                          COR_PRF_ENABLE_INPROC_DEBUGGING |  
                                          COR_PRF_ENABLE_JIT_MAPS |  
                                          COR_PRF_DISABLE_OPTIMIZATIONS |  
                                          COR_PRF_DISABLE_INLINING |  
                                          COR_PRF_ENABLE_OBJECT_ALLOCATED |  
                                          COR_PRF_ENABLE_FUNCTION_ARGS |  
                                          COR_PRF_ENABLE_FUNCTION_RETVAL |  
                                          COR_PRF_ENABLE_FRAME_INFO |  
                                          COR_PRF_USE_PROFILE_IMAGES |  
                     COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST |  
                                          COR_PRF_DISABLE_ALL_NGEN_IMAGES  
} COR_PRF_MONITOR;  
  

The following sections list COR_PRF_MONITOR enumeration members by category. The categories are:

No flags set

MemberDescription
COR_PRF_MONITOR_NONENo flags are set.

Callback flags

MemberDescription
COR_PRF_MONITOR_ALLEnables all callback events.
COR_PRF_MONITOR_APPDOMAIN_LOADSControls the AppDomainCreation* and AppDomainShutdown* callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_ASSEMBLY_LOADSControls the AssemblyLoad* and AssemblyUnload* callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_CACHE_SEARCHESControls the JITCachedFunctionSearch* callbacks in the ICorProfilerCallback interface.

The behavior of this flag is changed in the .NET Framework version 2.0.
COR_PRF_MONITOR_CCWControls the COMClassicVTable* callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_CLASS_LOADSControls the ClassLoad* and ClassUnload* callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_CLR_EXCEPTIONSControls the ExceptionCLRCatcher* callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_CODE_TRANSITIONSControls the UnmanagedToManagedTransition and ManagedToUnmanagedTransition callbacks in the ICorProfilerCallback interface
COR_PRF_MONITOR_ENTERLEAVEControls the FunctionEnter*, FunctionLeave*, and FunctionTailCall*profiling global static functions.
COR_PRF_MONITOR_EXCEPTIONSControls the ExceptionThrown callback and the ExceptionSearch*, ExceptionOSHandler*, ExceptionUnwind*, and ExceptionCatcher* callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_FUNCTION_UNLOADSControls the FunctionUnloadStarted callback in the ICorProfilerCallback interface.
COR_PRF_MONITOR_GCControls the GarbageCollectionStarted, GarbageCollectionFinished, MovedReferences, MovedReferences2, SurvivingReferences, SurvivingReferences2, ObjectReferences, ObjectsAllocatedByClass, RootReferences, RootReferences2, HandleCreated, HandleDestroyed, and FinalizeableObjectQueued callbacks in the ICorProfilerCallback* interfaces.
COR_PRF_MONITOR_JIT_COMPILATIONControls the JITCompilation*, JITFunctionPitched, and JITInlining callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_MODULE_LOADSControls the ModuleLoad*, ModuleUnload*, and ModuleAttachedToAssembly callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_OBJECT_ALLOCATEDControls the ObjectAllocated callback in the ICorProfilerCallback interface.
COR_PRF_MONITOR_REMOTINGControls the Remoting* callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_REMOTING_ASYNCControls whether the Remoting* callbacks will monitor asynchronous events.
COR_PRF_MONITOR_REMOTING_COOKIEControls whether a cookie is passed to the Remoting* callbacks.
COR_PRF_MONITOR_SUSPENDSControls the RuntimeSuspend*, RuntimeResume*, RuntimeThreadSuspended, and RuntimeThreadResumed callbacks in the ICorProfilerCallback interface.
COR_PRF_MONITOR_THREADSControls the ThreadCreated, ThreadDestroyed, ThreadAssignedToOSThread, and ThreadNameChanged callbacks in the ICorProfilerCallback and ICorProfilerCallback2 interfaces.

Feature-enabling flags

MemberDescription
COR_PRF_ENABLE_FRAME_INFOEnables the retrieval of an exact ClassID for a generic function by calling the GetFunctionInfo2 method with a COR_PRF_FRAME_INFO value returned by the FunctionEnter2 callback.
COR_PRF_ENABLE_FUNCTION_ARGSEnables argument tracing using the FunctionEnter2 callback or the FunctionEnter3WithInfo callback and the GetFunctionEnter3Info method.
COR_PRF_ENABLE_FUNCTION_RETVALEnables tracing of return values by using the FunctionLeave2 callback or the FunctionLeave3WithInfo callback and GetFunctionLeave3Info method.
COR_PRF_ENABLE_INPROC_DEBUGGINGDeprecated.

In process debugging is not supported. This flag has no effect.
COR_PRF_ENABLE_JIT_MAPSDeprecated.

Allows the profiler to obtain IL-to-native maps by using GetILToNativeMapping. Starting with the .NET Framework 2.0, the runtime always tracks IL-to-native maps; therefore, this flag is always considered to be set.
COR_PRF_ENABLE_OBJECT_ALLOCATEDInforms the runtime that the profiler may want object allocation notifications. This flag must be set during initialization. It allows the profiler to subsequently use the COR_PRF_MONITOR_OBJECT_ALLOCATED flag to receive ObjectAllocated callbacks.
COR_PRF_ENABLE_REJITEnables calls to the RequestReJIT and RequestRevert methods. The profiler must set this flag on startup. If the profiler specifies this flag, it must also specify COR_PRF_DISABLE_ALL_NGEN_IMAGES.
COR_PRF_ENABLE_STACK_SNAPSHOTEnables calls to the DoStackSnapshot method.

Configuration flags

MemberDescription
COR_PRF_DISABLE_ALL_NGEN_IMAGESPrevents all native images (including profiler-enhanced images) from loading. If this flag and the COR_PRF_USE_PROFILE_IMAGES flag are both specified, COR_PRF_DISABLE_ALL_NGEN_IMAGES is used.
COR_PRF_DISABLE_INLININGDisables all inlining.
COR_PRF_DISABLE_OPTIMIZATIONSDisables all code optimizations.
COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUSTDisables security transparency checks that are normally done during just-in-time (JIT) compilation and class loading for full-trust assemblies. This can make some instrumentation easier to perform.
COR_PRF_USE_PROFILE_IMAGESCauses the native image search to look for profiler-enhanced images. If no profiler-enhanced image is found for a given assembly, the common language runtime falls back to JIT for that assembly. If this flag and the COR_PRF_DISABLE_ALL_NGEN_IMAGES flag are both specified, COR_PRF_DISABLE_ALL_NGEN_IMAGES is used.

Composite flags

MemberDescription
COR_PRF_ALLRepresents all COR_PRF_MONITOR flag values.
COR_PRF_ALLOWABLE_AFTER_ATTACHRepresents all COR_PRF_MONITOR flags that can be set after the profiler is attached to a running app. The syntax section indicates the individual flags that are present in this bitmask.
COR_PRF_MONITOR_ALLEnables all callback events.
COR_PRF_MONITOR_IMMUTABLERepresents all COR_PRF_MONITOR flags that can be set only during initialization. Trying to change any of these flags after initialization returns an HRESULT value that indicates failure.
COR_PRF_REQUIRE_PROFILE_IMAGERepresents all COR_PRF_MONITOR flags that require profile-enhanced images.

A COR_PRF_MONITOR value is used with the ICorProfilerInfo::GetEventMask and ICorProfilerInfo::SetEventMask methods to define the event notifications that the common language runtime makes to the profiler.

Platforms: See System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: Available since 1.0

Profiling Enumerations
GetEventMask Method
SetEventMask Method

Show: