[Mono]: Add a verbose jit done event into EventPipe MonoProfiler provider. (#56530)
authorJohan Lorensson <lateralusx.github@gmail.com>
Wed, 4 Aug 2021 07:38:35 +0000 (09:38 +0200)
committerGitHub <noreply@github.com>
Wed, 4 Aug 2021 07:38:35 +0000 (09:38 +0200)
* Add a verbose jit done event into EventPipe MonoProfiler provider.

In order to get full method info in nettrace it is sometimes needed to
include method load verbose info. This can be done using Microsoft-
Windows-DotNETRuntime provider, but when using that it will also setup
a lot of managed diagnostics classes highly affecting startup profiling.

MonoProfiler provider, Microsoft-DotNETRuntimeMonoProfiler already emits
all needed info for advanced low level diagnostics, but currently lacks
verbose method load data when emitting jit done event.

Commit also adds new versions to JitDone as well as ClassLoaded including
generic type info if available as well as dropping use of ClrInstanceId since
it is not used/needed for events that are new.

src/coreclr/scripts/genEventPipe.py
src/coreclr/vm/ClrEtwAll.man
src/coreclr/vm/ClrEtwAllMeta.lst
src/mono/mono/eventpipe/ep-rt-mono.c

index 1076b18..581d50c 100644 (file)
@@ -593,7 +593,6 @@ write_buffer (
     size_t *size,
     bool *fixed_buffer)
 {
-    EP_ASSERT (value != NULL);
     EP_ASSERT (buffer != NULL);
     EP_ASSERT (offset != NULL);
     EP_ASSERT (size != NULL);
index 826c790..8508666 100644 (file)
                             <opcode name="ThreadStopped" message="$(string.MonoProfilerPublisher.ThreadStoppedOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_STOPPED_OPCODE" value="76" />
                             <opcode name="ThreadExited" message="$(string.MonoProfilerPublisher.ThreadExitedOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_EXITED_OPCODE" value="77" />
                             <opcode name="ThreadName" message="$(string.MonoProfilerPublisher.ThreadNameOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_NAME_OPCODE" value="78" />
+                            <opcode name="JitDoneVerbose" message="$(string.MonoProfilerPublisher.JitDoneVerboseOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_DONE_VERBOSE_OPCODE" value="79" />
                         </opcodes>
                     </task>
                 </tasks>
 
                 <templates>
                     <template tid="ContextLoadedUnloaded">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         <data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ContextID" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
-                            <AppDomainLoadUnload xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ObjectID> %2 </ObjectID>
-                                <AppDomainID> %3 </AppDomainID>
-                                <ContextID> %4 </ContextID>
-                            </AppDomainLoadUnload>
+                            <ContextLoadedUnloaded xmlns="myNs">
+                                <ObjectID> %1 </ObjectID>
+                                <AppDomainID> %2 </AppDomainID>
+                                <ContextID> %3 </ContextID>
+                            </ContextLoadedUnloaded>
                         </UserData>
                     </template>
 
                     <template tid="AppDomainLoadUnload">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <AppDomainLoadUnload xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <AppDomainID> %2 </AppDomainID>
+                                <AppDomainID> %1 </AppDomainID>
                             </AppDomainLoadUnload>
                         </UserData>
                     </template>
 
                     <template tid="AppDomainName">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="AppDomainName" inType="win:UnicodeString" />
                         <UserData>
                             <AppDomainName xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <AppDomainID> %2 </AppDomainID>
-                                <AppDomainName> %3 </AppDomainName>
+                                <AppDomainID> %1 </AppDomainID>
+                                <AppDomainName> %2 </AppDomainName>
                             </AppDomainName>
                         </UserData>
                     </template>
 
                     <template tid="JitBeginFailedDone">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
                         <UserData>
                             <JitBeginFailedDone xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <MethodID> %2 </MethodID>
-                                <ModuleID> %3 </ModuleID>
-                                <MethodToken> %4 </MethodToken>
+                                <MethodID> %1 </MethodID>
+                                <ModuleID> %2 </ModuleID>
+                                <MethodToken> %3 </MethodToken>
                             </JitBeginFailedDone>
                         </UserData>
                     </template>
 
                     <template tid="JitChunkCreated">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ChunkID" inType="win:Pointer" outType="win:HexInt64" />
                         <data name="ChunkSize" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <JitChunkCreated xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ChunkID> %2 </ChunkID>
-                                <ChunkSize> %3 </ChunkSize>
+                                <ChunkID> %1 </ChunkID>
+                                <ChunkSize> %2 </ChunkSize>
                             </JitChunkCreated>
                         </UserData>
                     </template>
 
                     <template tid="JitChunkDestroyed">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ChunkID" inType="win:Pointer" outType="win:HexInt64" />
                         <UserData>
                             <JitChunkDestroyed xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ChunkID> %2 </ChunkID>
+                                <ChunkID> %1 </ChunkID>
                             </JitChunkDestroyed>
                         </UserData>
                     </template>
 
                     <template tid="JitCodeBuffer">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="BufferID" inType="win:Pointer" outType="win:HexInt64" />
                         <data name="BufferSize" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="BufferType" inType="win:UInt8" map="JitCodeBufferTypeMap" />
                         <UserData>
                             <JitCodeBuffer xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <BufferID> %2 </BufferID>
-                                <BufferSize> %3 </BufferSize>
+                                <BufferID> %1 </BufferID>
+                                <BufferSize> %2 </BufferSize>
                                 <BufferType> %3 </BufferType>
                             </JitCodeBuffer>
                         </UserData>
                     </template>
 
                     <template tid="ClassLoadingFailed">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <ClassLoadingFailed xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ClassID> %2 </ClassID>
-                                <ModuleID> %3 </ModuleID>
+                                <ClassID> %1 </ClassID>
+                                <ModuleID> %2 </ModuleID>
                             </ClassLoadingFailed>
                         </UserData>
                     </template>
 
                     <template tid="ClassLoaded">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ClassName" inType="win:UnicodeString" />
                         <UserData>
                             <ClassLoaded xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ClassID> %2 </ClassID>
-                                <ModuleID> %3 </ModuleID>
-                                <ClassName> %4 </ClassName>
+                                <ClassID> %1 </ClassID>
+                                <ModuleID> %2 </ModuleID>
+                                <ClassName> %3 </ClassName>
                             </ClassLoaded>
                         </UserData>
                     </template>
 
                     <template tid="VTableLoadingFailedLoaded">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <VTableLoadingFailedLoaded xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <VTableID> %2 </VTableID>
-                                <ClassID> %3 </ClassID>
-                                <AppDomainID> %4 </AppDomainID>
+                                <VTableID> %1 </VTableID>
+                                <ClassID> %2 </ClassID>
+                                <AppDomainID> %3 </AppDomainID>
                             </VTableLoadingFailedLoaded>
                         </UserData>
                     </template>
 
                     <template tid="ModuleLoadingUnloadingFailed">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <ModuleLoadingUnloadingFailed xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ModuleID> %2 </ModuleID>
+                                <ModuleID> %1 </ModuleID>
                             </ModuleLoadingUnloadingFailed>
                         </UserData>
                     </template>
 
                     <template tid="ModuleLoadedUnloaded">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ModuleName" inType="win:UnicodeString" />
                         <data name="ModuleSignature" inType="win:UnicodeString" />
                         <UserData>
                             <ModuleLoadedUnloaded xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ModuleID> %2 </ModuleID>
-                                <ModuleName> %3 </ModuleName>
-                                <ModuleSignature> %4 </ModuleSignature>
+                                <ModuleID> %1 </ModuleID>
+                                <ModuleName> %2 </ModuleName>
+                                <ModuleSignature> %3 </ModuleSignature>
                             </ModuleLoadedUnloaded>
                         </UserData>
                     </template>
 
                     <template tid="AssemblyLoadingUnloading">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <AssemblyLoadingUnloading xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <AssemblyID> %2 </AssemblyID>
-                                <ModuleID> %3 </ModuleID>
+                                <AssemblyID> %1 </AssemblyID>
+                                <ModuleID> %2 </ModuleID>
                             </AssemblyLoadingUnloading>
                         </UserData>
                     </template>
 
                     <template tid="AssemblyLoadedUnloaded">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="AssemblyName" inType="win:UnicodeString" />
                         <UserData>
-                            <ModuleLoadedUnloaded xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <AssemblyID> %2 </AssemblyID>
-                                <ModuleID> %3 </ModuleID>
-                                <AssemblyName> %4 </AssemblyName>
-                            </ModuleLoadedUnloaded>
+                            <AssemblyLoadedUnloaded xmlns="myNs">
+                                <AssemblyID> %1 </AssemblyID>
+                                <ModuleID> %2 </ModuleID>
+                                <AssemblyName> %3 </AssemblyName>
+                            </AssemblyLoadedUnloaded>
                         </UserData>
                     </template>
 
                     <template tid="MethodTracing">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <MethodTracing xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <MethodID> %2 </MethodID>
+                                <MethodID> %1 </MethodID>
                             </MethodTracing>
                         </UserData>
                     </template>
 
                     <template tid="ExceptionThrow">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         <UserData>
                             <ExceptionThrow xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <TypeID> %2 </TypeID>
-                                <ObjectID> %3 </ObjectID>
+                                <TypeID> %1 </TypeID>
+                                <ObjectID> %2 </ObjectID>
                             </ExceptionThrow>
                         </UserData>
                     </template>
 
                     <template tid="ExceptionClause">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ClauseType" inType="win:UInt8" map="ExceptionClauseTypeMap" />
                         <data name="ClauseIdx" inType="win:UInt32" />
                         <data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         <UserData>
                             <ExceptionClause xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ClauseType> %2 </ClauseType>
-                                <ClauseIdx> %3 </ClauseIdx>
-                                <MethodID> %4 </MethodID>
-                                <TypeID> %5 </TypeID>
-                                <ObjectID> %6 </ObjectID>
+                                <ClauseType> %1 </ClauseType>
+                                <ClauseIdx> %2 </ClauseIdx>
+                                <MethodID> %3 </MethodID>
+                                <TypeID> %4 </TypeID>
+                                <ObjectID> %5 </ObjectID>
                             </ExceptionClause>
                         </UserData>
                     </template>
 
                     <template tid="GCEvent">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="GCEventType" inType="win:UInt8" map="GCEventTypeMap" />
                         <data name="GCGeneration" inType="win:UInt32" />
                         <UserData>
                             <GCEvent xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <GCEventType> %2 </GCEventType>
-                                <GCGeneration> %3 </GCGeneration>
+                                <GCEventType> %1 </GCEventType>
+                                <GCGeneration> %2 </GCGeneration>
                             </GCEvent>
                         </UserData>
                     </template>
 
                     <template tid="GCAllocation">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         <data name="ObjectSize" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <GCAllocation xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <VTableID> %2 </VTableID>
-                                <ObjectID> %3 </ObjectID>
-                                <ObjectSize> %4 </ObjectSize>
+                                <VTableID> %1 </VTableID>
+                                <ObjectID> %2 </ObjectID>
+                                <ObjectSize> %3 </ObjectSize>
                             </GCAllocation>
                         </UserData>
                     </template>
 
                     <template tid="GCMoves">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="Count" inType="win:UInt32" outType="win:HexInt32" />
                         <struct name="Values" count="Count">
                             <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         </struct>
                         <UserData>
                             <GCMoves xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <Count> %2 </Count>
+                                <Count> %1 </Count>
                             </GCMoves>
                         </UserData>
                     </template>
 
                     <template tid="GCResize">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="NewSize" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <GCResize xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <NewSize> %2 </NewSize>
+                                <NewSize> %1 </NewSize>
                             </GCResize>
                         </UserData>
                     </template>
 
                     <template tid="GCHandleCreated">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="HandleID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="HandleType" inType="win:UInt8" map="GCHandleTypeMap" />
                         <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         <UserData>
                             <GCHandleCreated xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <HandleID> %2 </HandleID>
-                                <HandleType> %3 </HandleType>
-                                <ObjectID> %4 </ObjectID>
+                                <HandleID> %1 </HandleID>
+                                <HandleType> %2 </HandleType>
+                                <ObjectID> %3 </ObjectID>
                             </GCHandleCreated>
                         </UserData>
                     </template>
 
                     <template tid="GCHandleDeleted">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="HandleID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="HandleType" inType="win:UInt8" map="GCHandleTypeMap" />
                         <UserData>
                             <GCHandleDeleted xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <HandleID> %2 </HandleID>
-                                <HandleType> %3 </HandleType>
+                                <HandleID> %1 </HandleID>
+                                <HandleType> %2 </HandleType>
                             </GCHandleDeleted>
                         </UserData>
                     </template>
 
-                    <template tid="GCFinalizingFinalized">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
-                        <UserData>
-                            <GCFinalizingFinalized xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                            </GCFinalizingFinalized>
-                        </UserData>
-                    </template>
-
                     <template tid="GCFinalizingFinalizedObject">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         <UserData>
-                            <GCFinalizingFinalized xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ObjectID> %2 </ObjectID>
-                            </GCFinalizingFinalized>
+                            <GCFinalizingFinalizedObject xmlns="myNs">
+                                <ObjectID> %1 </ObjectID>
+                            </GCFinalizingFinalizedObject>
                         </UserData>
                     </template>
 
                     <template tid="GCRootRegister">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="RootID" inType="win:Pointer" outType="win:HexInt64" />
                         <data name="RootSize" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="RootType" inType="win:UInt8" map="GCRootTypeMap" />
                         <data name="RootKeyName" inType="win:UnicodeString" />
                         <UserData>
                             <GCRootRegister xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <RootID> %2 </RootID>
-                                <RootSize> %3 </RootSize>
-                                <RootType> %4 </RootType>
-                                <RootKeyID> %5 </RootKeyID>
-                                <RootKeyName> %6 </RootKeyName>
+                                <RootID> %1 </RootID>
+                                <RootSize> %2 </RootSize>
+                                <RootType> %3 </RootType>
+                                <RootKeyID> %4 </RootKeyID>
+                                <RootKeyName> %5 </RootKeyName>
                             </GCRootRegister>
                         </UserData>
                     </template>
 
                     <template tid="GCRootUnregister">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="RootID" inType="win:Pointer" outType="win:HexInt64" />
                         <UserData>
                             <GCRootUnregister xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <RootID> %2 </RootID>
+                                <RootID> %1 </RootID>
                             </GCRootUnregister>
                         </UserData>
                     </template>
 
                     <template tid="GCRoots">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="Count" inType="win:UInt32" outType="win:HexInt32" />
                         <struct name="Values" count="Count">
                             <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         </struct>
                         <UserData>
                             <GCRoots xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <Count> %2 </Count>
+                                <Count> %1 </Count>
                             </GCRoots>
                         </UserData>
                     </template>
 
-                    <template tid="GCHeapDumpStartStop">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
-                        <UserData>
-                            <GCHeapDumpStartStop xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                            </GCHeapDumpStartStop>
-                        </UserData>
-                    </template>
-
                     <template tid="GCHeapDumpObjectReference">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         <data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ObjectSize" inType="win:UInt64" outType="win:HexInt64" />
                         </struct>
                         <UserData>
                             <GCHeapDumpObjectReference xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ObjectID> %2 </ObjectID>
-                                <VTableID> %3 </VTableID>
-                                <ObjectSize> %4 </ObjectSize>
-                                <ObjectGeneration> %5 </ObjectGeneration>
-                                <Count> %6 </Count>
+                                <ObjectID> %1 </ObjectID>
+                                <VTableID> %2 </VTableID>
+                                <ObjectSize> %3 </ObjectSize>
+                                <ObjectGeneration> %4 </ObjectGeneration>
+                                <Count> %5 </Count>
                             </GCHeapDumpObjectReference>
                         </UserData>
                     </template>
 
                     <template tid="MonitorContentionFailedAcquired">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
                         <UserData>
-                            <GCHeapDumpStartStop xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ObjectID> %2 </ObjectID>
-                            </GCHeapDumpStartStop>
+                            <MonitorContentionFailedAcquired xmlns="myNs">
+                                <ObjectID> %1 </ObjectID>
+                            </MonitorContentionFailedAcquired>
                         </UserData>
                     </template>
 
                     <template tid="ThreadStartedStoppingStoppedExited">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ThreadID" inType="win:UInt64" outType="win:HexInt64" />
                         <UserData>
                             <ThreadStartedStoppingStoppedExited xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ThreadID> %2 </ThreadID>
+                                <ThreadID> %1 </ThreadID>
                             </ThreadStartedStoppingStoppedExited>
                         </UserData>
                     </template>
 
                     <template tid="ThreadName">
-                        <data name="ClrInstanceID" inType="win:UInt16" />
                         <data name="ThreadID" inType="win:UInt64" outType="win:HexInt64" />
                         <data name="ThreadName" inType="win:UnicodeString" />
                         <UserData>
                             <ThreadName xmlns="myNs">
-                                <ClrInstanceID> %1 </ClrInstanceID>
-                                <ThreadID> %2 </ThreadID>
-                                <ThreadName> %3 </ThreadName>
+                                <ThreadID> %1 </ThreadID>
+                                <ThreadName> %2 </ThreadName>
                             </ThreadName>
                         </UserData>
                     </template>
 
+                    <template tid="JitDoneVerbose">
+                        <data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
+                        <data name="MethodNamespace" inType="win:UnicodeString" />
+                        <data name="MethodName" inType="win:UnicodeString" />
+                        <data name="MethodSignature" inType="win:UnicodeString" />
+                        <UserData>
+                            <JitDoneVerbose xmlns="myNs">
+                                <MethodID> %1 </MethodID>
+                                <MethodNamespace> %2 </MethodNamespace>
+                                <MethodName> %3 </MethodName>
+                                <MethodSignature> %4 </MethodSignature>
+                            </JitDoneVerbose>
+                        </UserData>
+                    </template>
+
+                    <template tid="JitDone_V1">
+                        <data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
+                        <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
+                        <data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
+                        <data name="Count" inType="win:UInt32" outType="win:HexInt32" />
+                        <struct name="Values" count="Count">
+                            <data name="Type" inType="win:UInt8" />
+                            <data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
+                        </struct>
+                        <UserData>
+                            <JitDone_V1 xmlns="myNs">
+                                <MethodID> %1 </MethodID>
+                                <ModuleID> %2 </ModuleID>
+                                <MethodToken> %3 </MethodToken>
+                                <Count> %4 </Count>
+                            </JitDone_V1>
+                        </UserData>
+                    </template>
+
+                    <template tid="ClassLoaded_V1">
+                        <data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
+                        <data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
+                        <data name="ClassName" inType="win:UnicodeString" />
+                        <data name="Count" inType="win:UInt32" outType="win:HexInt32" />
+                        <struct name="Values" count="Count">
+                            <data name="Type" inType="win:UInt8" />
+                            <data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
+                        </struct>
+                        <UserData>
+                            <ClassLoaded_V1 xmlns="myNs">
+                                <ClassID> %1 </ClassID>
+                                <ModuleID> %2 </ModuleID>
+                                <ClassName> %3 </ClassName>
+                                <Count> %4 </Count>
+                            </ClassLoaded_V1>
+                        </UserData>
+                    </template>
+
                 </templates>
 
                 <events>
                            task="MonoProfiler"
                            symbol="MonoProfilerJitDone" message="$(string.MonoProfilerPublisher.JitBeginFailedDoneEventMessage)" />
 
+                    <event value="10" version="1" level="win:Informational"  template="JitDone_V1"
+                           keywords ="JitKeyword" opcode="JitDone"
+                           task="MonoProfiler"
+                           symbol="MonoProfilerJitDone_V1" message="$(string.MonoProfilerPublisher.JitDone_V1EventMessage)" />
+
                     <event value="11" version="0" level="win:Informational"  template="JitChunkCreated"
                            keywords ="JitKeyword" opcode="JitChunkCreated"
                            task="MonoProfiler"
                            task="MonoProfiler"
                            symbol="MonoProfilerClassLoaded" message="$(string.MonoProfilerPublisher.ClassLoadedEventMessage)" />
 
+                    <event value="16" version="1" level="win:Informational"  template="ClassLoaded_V1"
+                           keywords ="TypeLoadingKeyword" opcode="ClassLoaded"
+                           task="MonoProfiler"
+                           symbol="MonoProfilerClassLoaded_V1" message="$(string.MonoProfilerPublisher.ClassLoaded_V1EventMessage)" />
+
                     <event value="17" version="0" level="win:Verbose"  template="VTableLoadingFailedLoaded"
                            keywords ="TypeLoadingKeyword" opcode="VTableLoading"
                            task="MonoProfiler"
                            task="MonoProfiler"
                            symbol="MonoProfilerGCHandleDeleted" message="$(string.MonoProfilerPublisher.GCHandleDeletedEventMessage)" />
 
-                    <event value="44" version="0" level="win:Informational"  template="GCFinalizingFinalized"
+                    <event value="44" version="0" level="win:Informational"
                            keywords ="GCKeyword GCFinalizationKeyword" opcode="GCFinalizing"
                            task="MonoProfiler"
                            symbol="MonoProfilerGCFinalizing" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedEventMessage)" />
 
-                    <event value="45" version="0" level="win:Informational"  template="GCFinalizingFinalized"
+                    <event value="45" version="0" level="win:Informational"
                            keywords ="GCKeyword GCFinalizationKeyword" opcode="GCFinalized"
                            task="MonoProfiler"
                            symbol="MonoProfilerGCFinalized" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedEventMessage)" />
                            task="MonoProfiler"
                            symbol="MonoProfilerGCRoots" message="$(string.MonoProfilerPublisher.GCRootsEventMessage)" />
 
-                    <event value="51" version="0" level="win:Informational"  template="GCHeapDumpStartStop"
+                    <event value="51" version="0" level="win:Informational"
                            keywords ="GCKeyword GCHeapDumpKeyword" opcode="GCHeapDumpStart"
                            task="MonoProfiler"
                            symbol="MonoProfilerGCHeapDumpStart" message="$(string.MonoProfilerPublisher.GCHeapDumpStartStopEventMessage)" />
 
-                    <event value="52" version="0" level="win:Informational"  template="GCHeapDumpStartStop"
+                    <event value="52" version="0" level="win:Informational"
                            keywords ="GCKeyword GCHeapDumpKeyword" opcode="GCHeapDumpStop"
                            task="MonoProfiler"
                            symbol="MonoProfilerGCHeapDumpStop" message="$(string.MonoProfilerPublisher.GCHeapDumpStartStopEventMessage)" />
                            keywords ="ThreadingKeyword" opcode="ThreadName"
                            task="MonoProfiler"
                            symbol="MonoProfilerThreadName" message="$(string.MonoProfilerPublisher.ThreadNameEventMessage)" />
+
+                    <event value="62" version="0" level="win:Verbose"  template="JitDoneVerbose"
+                           keywords ="JitKeyword" opcode="JitDoneVerbose"
+                           task="MonoProfiler"
+                           symbol="MonoProfilerJitDoneVerbose" message="$(string.MonoProfilerPublisher.JitDoneVerboseEventMessage)" />
                 </events>
             </provider>
         </events>
                 <string id="MonoProfilerPublisher.ThreadExitedOpcodeMessage" value="ThreadExited" />
                 <string id="MonoProfilerPublisher.ThreadNameOpcodeMessage" value="ThreadName" />
 
+                <string id="MonoProfilerPublisher.JitDoneVerboseOpcodeMessage" value="JitDoneVerbose" />
+
                 <string id="MonoProfilerPublisher.CodeBufferTypeMap.MethodMessage" value="Method" />
                 <string id="MonoProfilerPublisher.CodeBufferTypeMap.MethodTrampolineMessage" value="MethodTrampoline" />
                 <string id="MonoProfilerPublisher.CodeBufferTypeMap.UnboxTrampolineMessage" value="UnboxTrampoline" />
                 <string id="MonoProfilerPublisher.GCRootTypeMap.EphemeronMessage" value="Ephemeron" />
                 <string id="MonoProfilerPublisher.GCRootTypeMap.ToggleRefMessage" value="ToggleRef" />
 
-                <string id="MonoProfilerPublisher.ContextLoadedUnloadedEventMessage" value="ClrInstanceID=%1;%nObjectID=%2;%nAppDomainId=%3;%nContextID=%4" />
+                <string id="MonoProfilerPublisher.ContextLoadedUnloadedEventMessage" value="ObjectID=%1;%nAppDomainId=%2;%nContextID=%3" />
+
+                <string id="MonoProfilerPublisher.AppDomainLoadUnloadEventMessage" value="AppDomainId=%1" />
+                <string id="MonoProfilerPublisher.AppDomainNameEventMessage" value="AppDomainId=%1;%nAppDomainName=%2" />
 
-                <string id="MonoProfilerPublisher.AppDomainLoadUnloadEventMessage" value="ClrInstanceID=%1;%nAppDomainId=%2" />
-                <string id="MonoProfilerPublisher.AppDomainNameEventMessage" value="ClrInstanceID=%1;%nAppDomainId=%2;%nAppDomainName=%3" />
+                <string id="MonoProfilerPublisher.JitBeginFailedDoneEventMessage" value="MethodId=%1;%nModuleID=%2;%nMethodToken=%3" />
+                <string id="MonoProfilerPublisher.JitDone_V1EventMessage" value="MethodId=%1;%nModuleID=%2;%nMethodToken=%3;%nCount=%4" />
 
-                <string id="MonoProfilerPublisher.JitBeginFailedDoneEventMessage" value="ClrInstanceID=%1;%nMethodId=%2;%nModuleID=%3;%nMethodToken=%4" />
+                <string id="MonoProfilerPublisher.JitChunkCreatedEventMessage" value="ChunkID=%1;%nChunkSize=%2" />
+                <string id="MonoProfilerPublisher.JitChunkDestroyedEventMessage" value="ChunkID=%1" />
+                <string id="MonoProfilerPublisher.JitCodeBufferEventMessage" value="BufferID=%1;%nBufferSize=%2;%nBufferType=%3" />
 
-                <string id="MonoProfilerPublisher.JitChunkCreatedEventMessage" value="ClrInstanceID=%1;%nChunkID=%2;%nChunkSize=%3" />
-                <string id="MonoProfilerPublisher.JitChunkDestroyedEventMessage" value="ClrInstanceID=%1;%nChunkID=%2" />
-                <string id="MonoProfilerPublisher.JitCodeBufferEventMessage" value="ClrInstanceID=%1;%nBufferID=%2;%nBufferSize=%3;%nBufferType=%4" />
+                <string id="MonoProfilerPublisher.ClassLoadingFailedEventMessage" value="ClassID=%1;%nModuleID=%2" />
+                <string id="MonoProfilerPublisher.ClassLoadedEventMessage" value="ClassID=%1;%nModuleID=%2;%nClassName=%3" />
+                <string id="MonoProfilerPublisher.ClassLoaded_V1EventMessage" value="ClassID=%1;%nModuleID=%2;%nClassName=%3;%nCount=%4" />
 
-                <string id="MonoProfilerPublisher.ClassLoadingFailedEventMessage" value="ClrInstanceID=%1;%nClassID=%2;%nModuleID=%3" />
-                <string id="MonoProfilerPublisher.ClassLoadedEventMessage" value="ClrInstanceID=%1;%nClassID=%2;%nModuleID=%3;%nClassName=%4" />
+                <string id="MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage" value="VTableID=%1;%nClassID=%2;%nAppDomainID=%3" />
 
-                <string id="MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage" value="ClrInstanceID=%1;%nVTableID=%2;%nClassID=%3;%nAppDomainID=%4" />
+                <string id="MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage" value="ModuleID=%1" />
+                <string id="MonoProfilerPublisher.ModuleLoadedUnloadedEventMessage" value="ModuleID=%1;%nModuleName=%2;%nModuleSignature=%3" />
 
-                <string id="MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage" value="ClrInstanceID=%1;%nModuleID=%2" />
-                <string id="MonoProfilerPublisher.ModuleLoadedUnloadedEventMessage" value="ClrInstanceID=%1;%nModuleID=%2;%nModuleName=%3;%nModuleSignature=%4" />
+                <string id="MonoProfilerPublisher.AssemblyLoadingUnloadingEventMessage" value="AssemblyID=%1;%nModuleID=%2" />
+                <string id="MonoProfilerPublisher.AssemblyLoadedUnloadedEventMessage" value="%nAssemblyID=%1;%nModuleID=%2;%nAssemblyName=%3" />
 
-                <string id="MonoProfilerPublisher.AssemblyLoadingUnloadingEventMessage" value="ClrInstanceID=%1;%nAssemblyID=%2;%nModuleID=%3" />
-                <string id="MonoProfilerPublisher.AssemblyLoadedUnloadedEventMessage" value="ClrInstanceID=%1;%nAssemblyID=%2;%nModuleID=%3;%nAssemblyName=%4" />
+                <string id="MonoProfilerPublisher.MethodTracingEventMessage" value="MethodID=%1" />
 
-                <string id="MonoProfilerPublisher.MethodTracingEventMessage" value="ClrInstanceID=%1;%nMethodID=%2" />
+                <string id="MonoProfilerPublisher.ExceptionThrowEventMessage" value="TypeID=%1;%nObjectID=%2" />
+                <string id="MonoProfilerPublisher.ExceptionClauseEventMessage" value="ClauseType=%1;%nClauseID=%2;%nMethodID=%3;%nTypeID=%4;%nObjectID=%5" />
 
-                <string id="MonoProfilerPublisher.ExceptionThrowEventMessage" value="ClrInstanceID=%1;%nTypeID=%2;%nObjectID=%3" />
-                <string id="MonoProfilerPublisher.ExceptionClauseEventMessage" value="ClrInstanceID=%1;%nClauseType=%2;%nClauseID=%3;%nMethodID=%4;%nTypeID=%5;%nObjectID=%6" />
+                <string id="MonoProfilerPublisher.GCEventEventMessage" value="GCEventType=%1;%nGCGeneration=%2" />
+                <string id="MonoProfilerPublisher.GCAllocationEventMessage" value="VTableID=%1;%nObjectID=%2;%nObjectSize=%3" />
+                <string id="MonoProfilerPublisher.GCMovesEventMessage" value="Count=%1" />
+                <string id="MonoProfilerPublisher.GCResizeEventMessage" value="NewSize=%1" />
+                <string id="MonoProfilerPublisher.GCHandleCreatedEventMessage" value="HandleID=%1;%nHandleType=%2;%nObjectID=%3" />
+                <string id="MonoProfilerPublisher.GCHandleDeletedEventMessage" value="HandleID=%1;%nHandleType=%2" />
+                <string id="MonoProfilerPublisher.GCFinalizingFinalizedEventMessage" value="NONE" />
+                <string id="MonoProfilerPublisher.GCFinalizingFinalizedObjectEventMessage" value="ObjectID=%1" />
+                <string id="MonoProfilerPublisher.GCRootRegisterEventMessage" value="RootID=%1;%nRootSize=%2;%nRootType=%3;%nRootKeyID=%4;%nRootKeyName=%5" />
+                <string id="MonoProfilerPublisher.GCRootUnregisterEventMessage" value="RootID=%1" />
+                <string id="MonoProfilerPublisher.GCRootsEventMessage" value="Count=%1" />
+                <string id="MonoProfilerPublisher.GCHeapDumpStartStopEventMessage" value="NONE" />
+                <string id="MonoProfilerPublisher.GCHeapDumpObjectReferenceEventMessage" value="ObjectID=%1;%nVTableID=%2;%nObjectSize=%3;%nObjectGeneration=%4;%nCount=%5" />
 
-                <string id="MonoProfilerPublisher.GCEventEventMessage" value="ClrInstanceID=%1;%nGCEventType=%2;%nGCGeneration=%3" />
-                <string id="MonoProfilerPublisher.GCAllocationEventMessage" value="ClrInstanceID=%1;%nVTableID=%2;%nObjectID=%3;%nObjectSize=%4" />
-                <string id="MonoProfilerPublisher.GCMovesEventMessage" value="ClrInstanceID=%1;%nCount=%2" />
-                <string id="MonoProfilerPublisher.GCResizeEventMessage" value="ClrInstanceID=%1;%nNewSize=%2" />
-                <string id="MonoProfilerPublisher.GCHandleCreatedEventMessage" value="ClrInstanceID=%1;%nHandleID=%2;%nHandleType=%3;%nObjectID=%4" />
-                <string id="MonoProfilerPublisher.GCHandleDeletedEventMessage" value="ClrInstanceID=%1;%nHandleID=%2;%nHandleType=%3" />
-                <string id="MonoProfilerPublisher.GCFinalizingFinalizedEventMessage" value="ClrInstanceID=%1" />
-                <string id="MonoProfilerPublisher.GCFinalizingFinalizedObjectEventMessage" value="ClrInstanceID=%1;%nObjectID=%2" />
-                <string id="MonoProfilerPublisher.GCRootRegisterEventMessage" value="ClrInstanceID=%1;%nRootID=%2;%nRootSize=%3;%nRootType=%4;%nRootKeyID=%5;%nRootKeyName=%6" />
-                <string id="MonoProfilerPublisher.GCRootUnregisterEventMessage" value="ClrInstanceID=%1;%nRootID=%2" />
-                <string id="MonoProfilerPublisher.GCRootsEventMessage" value="ClrInstanceID=%1;%nCount=%2" />
-                <string id="MonoProfilerPublisher.GCHeapDumpStartStopEventMessage" value="ClrInstanceID=%1" />
-                <string id="MonoProfilerPublisher.GCHeapDumpObjectReferenceEventMessage" value="ClrInstanceID=%1;%nObjectID=%2;%nVTableID=%3;%nObjectSize=%4;%nObjectGeneration=%5;%nCount=%6" />
+                <string id="MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage" value="ObjectID=%1" />
 
-                <string id="MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage" value="ClrInstanceID=%1;%nObjectID=%2" />
+                <string id="MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage" value="ThreadID=%1" />
+                <string id="MonoProfilerPublisher.ThreadNameEventMessage" value="ThreadID=%1;%nThreadName=%2" />
 
-                <string id="MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage" value="ClrInstanceID=%1;%nThreadID=%2" />
-                <string id="MonoProfilerPublisher.ThreadNameEventMessage" value="ClrInstanceID=%1;%nThreadID=%2;%nThreadName=%3" />
+                <string id="MonoProfilerPublisher.JitDoneVerboseEventMessage" value="MethodId=%1;%nMethodNamespace=%2;%nMethodName=%3;%nMethodSignature=%4" />
             </stringTable>
         </resources>
     </localization>
index 9c5738e..911ca62 100644 (file)
@@ -639,29 +639,30 @@ nomac:CLRStackStress:::CLRStackWalkStress
 #################################
 # Events from the Mono profiler provider
 #################################
-nostack::MonoProfiler::ExceptionClause
-nostack::MonoProfiler::MonoProfilerMethodEnter
-nostack::MonoProfiler::MonoProfilerMethodLeave
-nostack::MonoProfiler::MonoProfilerMethodTailCall
-nostack::MonoProfiler::MonoProfilerMethodExceptionLeave
-nostack::MonoProfiler::MonoProfilerMethodFree
-nostack::MonoProfiler::MonoProfilerMethodBeginInvoke
-nostack::MonoProfiler::MonoProfilerMethodEndInvoke
-nostack::MonoProfiler::MonoProfilerGCEvent
-nostack::MonoProfiler::MonoProfilerGCMoves
-nostack::MonoProfiler::MonoProfilerGCResize
-nostack::MonoProfiler::MonoProfilerGCFinalizing
-nostack::MonoProfiler::MonoProfilerGCFinalized
-nostack::MonoProfiler::MonoProfilerGCFinalizingObject
-nostack::MonoProfiler::MonoProfilerGCFinalizedObject
-nostack::MonoProfiler::MonoProfilerGCRootRegister
-nostack::MonoProfiler::MonoProfilerGCRootUnregister
-nostack::MonoProfiler::MonoProfilerGCRoots
-nostack::MonoProfiler::MonoProfilerGCHeapDumpStart
-nostack::MonoProfiler::MonoProfilerGCHeapDumpStop
-nostack::MonoProfiler::MonoProfilerGCHeapDumpObjectReference
-nostack::MonoProfiler::MonoProfilerThreadStarted
-nostack::MonoProfiler::MonoProfilerThreadStopping
-nostack::MonoProfiler::MonoProfilerThreadStopped
-nostack::MonoProfiler::MonoProfilerThreadExited
-nostack::MonoProfiler::MonoProfilerThreadName
\ No newline at end of file
+noclrinstanceid:MonoProfiler:::
+nostack:MonoProfiler:::MonoProfilerExceptionClause
+nostack:MonoProfiler:::MonoProfilerMethodEnter
+nostack:MonoProfiler:::MonoProfilerMethodLeave
+nostack:MonoProfiler:::MonoProfilerMethodTailCall
+nostack:MonoProfiler:::MonoProfilerMethodExceptionLeave
+nostack:MonoProfiler:::MonoProfilerMethodFree
+nostack:MonoProfiler:::MonoProfilerMethodBeginInvoke
+nostack:MonoProfiler:::MonoProfilerMethodEndInvoke
+nostack:MonoProfiler:::MonoProfilerGCEvent
+nostack:MonoProfiler:::MonoProfilerGCMoves
+nostack:MonoProfiler:::MonoProfilerGCResize
+nostack:MonoProfiler:::MonoProfilerGCFinalizing
+nostack:MonoProfiler:::MonoProfilerGCFinalized
+nostack:MonoProfiler:::MonoProfilerGCFinalizingObject
+nostack:MonoProfiler:::MonoProfilerGCFinalizedObject
+nostack:MonoProfiler:::MonoProfilerGCRootRegister
+nostack:MonoProfiler:::MonoProfilerGCRootUnregister
+nostack:MonoProfiler:::MonoProfilerGCRoots
+nostack:MonoProfiler:::MonoProfilerGCHeapDumpStart
+nostack:MonoProfiler:::MonoProfilerGCHeapDumpStop
+nostack:MonoProfiler:::MonoProfilerGCHeapDumpObjectReference
+nostack:MonoProfiler:::MonoProfilerThreadStarted
+nostack:MonoProfiler:::MonoProfilerThreadStopping
+nostack:MonoProfiler:::MonoProfilerThreadStopped
+nostack:MonoProfiler:::MonoProfilerThreadExited
+nostack:MonoProfiler:::MonoProfilerThreadName
\ No newline at end of file
index 683d94a..d8bf2c8 100644 (file)
@@ -517,6 +517,23 @@ mono_profiler_app_domain_name (
 
 static
 void
+mono_profiler_get_generic_types (
+       MonoGenericInst *generic_instance,
+       uint32_t *generic_type_count,
+       uint8_t **generic_types);
+
+static
+void
+mono_profiler_get_jit_data (
+       MonoMethod *method,
+       uint64_t *method_id,
+       uint64_t *module_id,
+       uint32_t *method_token,
+       uint32_t *method_generic_type_count,
+       uint8_t **method_generic_types);
+
+static
+void
 mono_profiler_jit_begin (
        MonoProfiler *prof,
        MonoMethod *method);
@@ -558,6 +575,16 @@ mono_profiler_jit_code_buffer (
 
 static
 void
+mono_profiler_get_class_data (
+       MonoClass *klass,
+       uint64_t *class_id,
+       uint64_t *module_id,
+       ep_char8_t **class_name,
+       uint32_t *class_generic_type_count,
+       uint8_t **class_generic_types);
+
+static
+void
 mono_profiler_class_loading (
        MonoProfiler *prof,
        MonoClass *klass);
@@ -2531,7 +2558,7 @@ ep_rt_mono_write_event_method_load (
        MonoMethod *method,
        MonoJitInfo *ji)
 {
-       if (!EventEnabledMethodLoad_V1 () && !EventEnabledMethodLoadVerbose_V1())
+       if (!EventEnabledMethodLoad_V1 () && !EventEnabledMethodLoadVerbose_V1 ())
                return true;
 
        //TODO: Optimize string formatting into functions accepting GString to reduce heap alloc.
@@ -2693,7 +2720,7 @@ get_module_event_data (
 bool
 ep_rt_mono_write_event_module_load (MonoImage *image)
 {
-       if (!EventEnabledModuleLoad_V2 () && !EventEnabledDomainModuleLoad_V1())
+       if (!EventEnabledModuleLoad_V2 () && !EventEnabledDomainModuleLoad_V1 ())
                return true;
 
        if (image) {
@@ -3652,7 +3679,6 @@ mono_profiler_app_domain_loading (
 
        uint64_t domain_id = (uint64_t)domain;
        FireEtwMonoProfilerAppDomainLoading (
-               clr_instance_get_id (),
                domain_id,
                NULL,
                NULL);
@@ -3669,7 +3695,6 @@ mono_profiler_app_domain_loaded (
 
        uint64_t domain_id = (uint64_t)domain;
        FireEtwMonoProfilerAppDomainLoaded (
-               clr_instance_get_id (),
                domain_id,
                NULL,
                NULL);
@@ -3686,7 +3711,6 @@ mono_profiler_app_domain_unloading (
 
        uint64_t domain_id = (uint64_t)domain;
        FireEtwMonoProfilerAppDomainUnloading (
-               clr_instance_get_id (),
                domain_id,
                NULL,
                NULL);
@@ -3703,7 +3727,6 @@ mono_profiler_app_domain_unloaded (
 
        uint64_t domain_id = (uint64_t)domain;
        FireEtwMonoProfilerAppDomainUnloaded (
-               clr_instance_get_id (),
                domain_id,
                NULL,
                NULL);
@@ -3721,7 +3744,6 @@ mono_profiler_app_domain_name (
 
        uint64_t domain_id = (uint64_t)domain;
        FireEtwMonoProfilerAppDomainName (
-               clr_instance_get_id (),
                domain_id,
                (const ep_char8_t *)(name ? name : ""),
                NULL,
@@ -3729,13 +3751,39 @@ mono_profiler_app_domain_name (
 }
 
 static
-inline
 void
-get_jit_data (
+mono_profiler_get_generic_types (
+       MonoGenericInst *generic_instance,
+       uint32_t *generic_type_count,
+       uint8_t **generic_types)
+{
+       if (generic_instance) {
+               uint8_t *buffer = g_malloc (generic_instance->type_argc * (sizeof (uint8_t) + sizeof (uint64_t)));
+               if (buffer) {
+                       *generic_types = buffer;
+                       *generic_type_count = generic_instance->type_argc;
+                       for (uint32_t i = 0; i < generic_instance->type_argc; ++i) {
+                               uint8_t type = generic_instance->type_argv [i]->type;
+                               memcpy (buffer, &type, sizeof (type));
+                               buffer += sizeof (type);
+
+                               uint64_t class_id = (uint64_t)mono_class_from_mono_type_internal (generic_instance->type_argv [i]);
+                               memcpy (buffer, &class_id, sizeof (class_id));
+                               buffer += sizeof (class_id);
+                       }
+               }
+       }
+}
+
+static
+void
+mono_profiler_get_jit_data (
        MonoMethod *method,
        uint64_t *method_id,
        uint64_t *module_id,
-       uint32_t *method_token)
+       uint32_t *method_token,
+       uint32_t *method_generic_type_count,
+       uint8_t **method_generic_types)
 {
        *method_id = (uint64_t)method;
        *module_id = 0;
@@ -3745,6 +3793,14 @@ get_jit_data (
                *method_token = method->token;
                if (method->klass)
                        *module_id = (uint64_t)m_class_get_image (method->klass);
+
+               if (method_generic_type_count && method_generic_types) {
+                       if (method->is_inflated) {
+                               MonoGenericContext *context = mono_method_get_context (method);
+                               MonoGenericInst *method_instance = (context && context->method_inst) ? context->method_inst : NULL;
+                               mono_profiler_get_generic_types (method_instance, method_generic_type_count, method_generic_types);
+                       }
+               }
        }
 }
 
@@ -3761,10 +3817,9 @@ mono_profiler_jit_begin (
        uint64_t module_id;
        uint32_t method_token;
 
-       get_jit_data (method, &method_id, &module_id, &method_token);
+       mono_profiler_get_jit_data (method, &method_id, &module_id, &method_token, NULL, NULL);
 
        FireEtwMonoProfilerJitBegin (
-               clr_instance_get_id (),
                method_id,
                module_id,
                method_token,
@@ -3785,10 +3840,9 @@ mono_profiler_jit_failed (
        uint64_t module_id;
        uint32_t method_token;
 
-       get_jit_data (method, &method_id, &module_id, &method_token);
+       mono_profiler_get_jit_data (method, &method_id, &module_id, &method_token, NULL, NULL);
 
        FireEtwMonoProfilerJitFailed (
-               clr_instance_get_id (),
                method_id,
                module_id,
                method_token,
@@ -3803,22 +3857,51 @@ mono_profiler_jit_done (
        MonoMethod *method,
        MonoJitInfo *ji)
 {
-       if (!EventEnabledMonoProfilerJitDone())
+       if (!EventEnabledMonoProfilerJitDone () && !EventEnabledMonoProfilerJitDone_V1 () && !EventEnabledMonoProfilerJitDoneVerbose ())
                return;
 
+       bool verbose = (MICROSOFT_DOTNETRUNTIME_MONO_PROFILER_PROVIDER_EVENTPIPE_Context.Level >= (uint8_t)EP_EVENT_LEVEL_VERBOSE);
+
        uint64_t method_id;
        uint64_t module_id;
        uint32_t method_token;
 
-       get_jit_data (method, &method_id, &module_id, &method_token);
+       uint32_t method_generic_type_count = 0;
+       uint8_t *method_generic_types = NULL;
 
-       FireEtwMonoProfilerJitDone (
-               clr_instance_get_id (),
+       mono_profiler_get_jit_data (method, &method_id, &module_id, &method_token, &method_generic_type_count, &method_generic_types);
+
+       FireEtwMonoProfilerJitDone_V1 (
                method_id,
                module_id,
                method_token,
+               method_generic_type_count,
+               sizeof (uint8_t) + sizeof (uint64_t),
+               method_generic_types,
                NULL,
                NULL);
+
+       g_free (method_generic_types);
+
+       if (verbose) {
+               //TODO: Optimize string formatting into functions accepting GString to reduce heap alloc.
+               char *method_namespace = NULL;
+               const char *method_name = method->name;
+               char *method_signature = mono_signature_full_name (method->signature);
+               if (method->klass)
+                       method_namespace = mono_type_get_name_full (m_class_get_byval_arg (method->klass), MONO_TYPE_NAME_FORMAT_IL);
+
+               FireEtwMonoProfilerJitDoneVerbose (
+                       method_id,
+                       (const ep_char8_t *)method_namespace,
+                       (const ep_char8_t *)method_name,
+                       (const ep_char8_t *)method_signature,
+                       NULL,
+                       NULL);
+
+               g_free (method_namespace);
+               g_free (method_signature);
+       }
 }
 
 static
@@ -3832,7 +3915,6 @@ mono_profiler_jit_chunk_created (
                return;
 
        FireEtwMonoProfilerJitChunkCreated (
-               clr_instance_get_id (),
                chunk,
                (uint64_t)size,
                NULL,
@@ -3849,7 +3931,6 @@ mono_profiler_jit_chunk_destroyed (
                return;
 
        FireEtwMonoProfilerJitChunkDestroyed (
-               clr_instance_get_id (),
                chunk,
                NULL,
                NULL);
@@ -3868,7 +3949,6 @@ mono_profiler_jit_code_buffer (
                return;
 
        FireEtwMonoProfilerJitCodeBuffer (
-               clr_instance_get_id (),
                buffer,
                size,
                (uint8_t)type,
@@ -3877,13 +3957,14 @@ mono_profiler_jit_code_buffer (
 }
 
 static
-inline
 void
-get_class_data (
+mono_profiler_get_class_data (
        MonoClass *klass,
        uint64_t *class_id,
        uint64_t *module_id,
-       ep_char8_t **class_name)
+       ep_char8_t **class_name,
+       uint32_t *class_generic_type_count,
+       uint8_t **class_generic_types)
 {
        *class_id = (uint64_t)klass;
        *module_id = 0;
@@ -3895,6 +3976,14 @@ get_class_data (
                *class_name = (ep_char8_t *)mono_type_get_name_full (m_class_get_byval_arg (klass), MONO_TYPE_NAME_FORMAT_IL);
        else if (class_name)
                *class_name = NULL;
+
+       if (class_generic_type_count && class_generic_types) {
+               if (mono_class_is_ginst (klass)) {
+                       MonoGenericContext *context = mono_class_get_context (klass);
+                       MonoGenericInst *class_instance = (context && context->class_inst) ? context->class_inst : NULL;
+                       mono_profiler_get_generic_types (class_instance, class_generic_type_count, class_generic_types);
+               }
+       }
 }
 
 static
@@ -3909,10 +3998,9 @@ mono_profiler_class_loading (
        uint64_t class_id;
        uint64_t module_id;
        
-       get_class_data (klass, &class_id, &module_id, NULL);
+       mono_profiler_get_class_data (klass, &class_id, &module_id, NULL, NULL, NULL);
 
        FireEtwMonoProfilerClassLoading (
-               clr_instance_get_id (),
                class_id,
                module_id,
                NULL,
@@ -3931,10 +4019,9 @@ mono_profiler_class_failed (
        uint64_t class_id;
        uint64_t module_id;
 
-       get_class_data (klass, &class_id, &module_id, NULL);
+       mono_profiler_get_class_data (klass, &class_id, &module_id, NULL, NULL, NULL);
 
        FireEtwMonoProfilerClassFailed (
-               clr_instance_get_id (),
                class_id,
                module_id,
                NULL,
@@ -3947,24 +4034,30 @@ mono_profiler_class_loaded (
        MonoProfiler *prof,
        MonoClass *klass)
 {
-       if (!EventEnabledMonoProfilerClassLoaded())
+       if (!EventEnabledMonoProfilerClassLoaded () && !EventEnabledMonoProfilerClassLoaded_V1 ())
                return;
 
        uint64_t class_id;
        uint64_t module_id;
        ep_char8_t *class_name;
 
-       get_class_data (klass, &class_id, &module_id, &class_name);
+       uint32_t class_generic_type_count = 0;
+       uint8_t *class_generic_types = NULL;
 
-       FireEtwMonoProfilerClassLoaded (
-               clr_instance_get_id (),
+       mono_profiler_get_class_data (klass, &class_id, &module_id, &class_name, &class_generic_type_count, &class_generic_types);
+
+       FireEtwMonoProfilerClassLoaded_V1 (
                class_id,
                module_id,
                class_name ? class_name : "",
+               class_generic_type_count,
+               sizeof (uint8_t) + sizeof (uint64_t),
+               class_generic_types,
                NULL,
                NULL);
 
        g_free (class_name);
+       g_free (class_generic_types);
 }
 
 static
@@ -4002,7 +4095,6 @@ mono_profiler_vtable_loading (
        get_vtable_data (vtable, &vtable_id, &class_id, &domain_id);
 
        FireEtwMonoProfilerVTableLoading (
-               clr_instance_get_id (),
                vtable_id,
                class_id,
                domain_id,
@@ -4026,7 +4118,6 @@ mono_profiler_vtable_failed (
        get_vtable_data (vtable, &vtable_id, &class_id, &domain_id);
                
        FireEtwMonoProfilerVTableFailed (
-               clr_instance_get_id (),
                vtable_id,
                class_id,
                domain_id,
@@ -4050,7 +4141,6 @@ mono_profiler_vtable_loaded (
        get_vtable_data (vtable, &vtable_id, &class_id, &domain_id);
                
        FireEtwMonoProfilerVTableLoaded (
-               clr_instance_get_id (),
                vtable_id,
                class_id,
                domain_id,
@@ -4068,7 +4158,6 @@ mono_profiler_module_loading (
                return;
        
        FireEtwMonoProfilerModuleLoading (
-               clr_instance_get_id (),
                (uint64_t)image,
                NULL,
                NULL);
@@ -4084,7 +4173,6 @@ mono_profiler_module_failed (
                return;
 
        FireEtwMonoProfilerModuleFailed (
-               clr_instance_get_id (),
                (uint64_t)image,
                NULL,
                NULL);
@@ -4111,7 +4199,6 @@ mono_profiler_module_loaded (
        }
 
        FireEtwMonoProfilerModuleLoaded (
-               clr_instance_get_id (),
                module_id,
                module_path ? module_path : "",
                module_guid ? module_guid : "",
@@ -4129,7 +4216,6 @@ mono_profiler_module_unloading (
                return;
 
        FireEtwMonoProfilerModuleUnloading (
-               clr_instance_get_id (),
                (uint64_t)image,
                NULL,
                NULL);
@@ -4156,7 +4242,6 @@ mono_profiler_module_unloaded (
        }
 
        FireEtwMonoProfilerModuleUnloaded (
-               clr_instance_get_id (),
                module_id,
                module_path ? module_path : "",
                module_guid ? module_guid : "",
@@ -4200,7 +4285,6 @@ mono_profiler_assembly_loading (
        get_assembly_data (assembly, &assembly_id, &module_id, NULL);
 
        FireEtwMonoProfilerAssemblyLoading (
-               clr_instance_get_id (),
                assembly_id,
                module_id,
                NULL,
@@ -4223,7 +4307,6 @@ mono_profiler_assembly_loaded (
        get_assembly_data (assembly, &assembly_id, &module_id, &assembly_name);
 
        FireEtwMonoProfilerAssemblyLoaded (
-               clr_instance_get_id (),
                assembly_id,
                module_id,
                assembly_name ? assembly_name : "",
@@ -4248,7 +4331,6 @@ mono_profiler_assembly_unloading (
        get_assembly_data (assembly, &assembly_id, &module_id, NULL);
 
        FireEtwMonoProfilerAssemblyUnloading (
-               clr_instance_get_id (),
                assembly_id,
                module_id,
                NULL,
@@ -4271,7 +4353,6 @@ mono_profiler_assembly_unloaded (
        get_assembly_data (assembly, &assembly_id, &module_id, &assembly_name);
 
        FireEtwMonoProfilerAssemblyUnloaded (
-               clr_instance_get_id (),
                assembly_id,
                module_id,
                assembly_name ? assembly_name : "",
@@ -4292,7 +4373,6 @@ mono_profiler_method_enter (
                return;
 
        FireEtwMonoProfilerMethodEnter (
-               clr_instance_get_id (),
                (uint64_t)method,
                NULL,
                NULL);
@@ -4309,7 +4389,6 @@ mono_profiler_method_leave (
                return;
 
        FireEtwMonoProfilerMethodLeave (
-               clr_instance_get_id (),
                (uint64_t)method,
                NULL,
                NULL);
@@ -4326,7 +4405,6 @@ mono_profiler_method_tail_call (
                return;
 
        FireEtwMonoProfilerMethodTailCall (
-               clr_instance_get_id (),
                (uint64_t)method,
                NULL,
                NULL);
@@ -4343,7 +4421,6 @@ mono_profiler_method_exception_leave (
                return;
 
        FireEtwMonoProfilerMethodExceptionLeave (
-               clr_instance_get_id (),
                (uint64_t)method,
                NULL,
                NULL);
@@ -4359,7 +4436,6 @@ mono_profiler_method_free (
                return;
 
        FireEtwMonoProfilerMethodFree (
-               clr_instance_get_id (),
                (uint64_t)method,
                NULL,
                NULL);
@@ -4375,7 +4451,6 @@ mono_profiler_method_begin_invoke (
                return;
 
        FireEtwMonoProfilerMethodBeginInvoke (
-               clr_instance_get_id (),
                (uint64_t)method,
                NULL,
                NULL);
@@ -4391,7 +4466,6 @@ mono_profiler_method_end_invoke (
                return;
 
        FireEtwMonoProfilerMethodEndInvoke (
-               clr_instance_get_id (),
                (uint64_t)method,
                NULL,
                NULL);
@@ -4427,7 +4501,6 @@ mono_profiler_exception_throw (
                type_id = (uint64_t)m_class_get_byval_arg (mono_object_class(exc));
 
        FireEtwMonoProfilerExceptionThrow (
-               clr_instance_get_id (),
                type_id,
                SGEN_POINTER_UNTAG_ALL (exc),
                NULL,
@@ -4452,7 +4525,6 @@ mono_profiler_exception_clause (
                type_id = (uint64_t)m_class_get_byval_arg (mono_object_class(exc));
 
        FireEtwMonoProfilerExceptionClause (
-               clr_instance_get_id (),
                (uint8_t)clause_type,
                clause_num,
                (uint64_t)method,
@@ -4475,7 +4547,6 @@ mono_profiler_gc_event (
 
        // TODO: Needs to be async safe.
        /*FireEtwMonoProfilerGCEvent (
-               clr_instance_get_id (),
                (uint8_t)gc_event,
                generation,
                NULL,
@@ -4504,7 +4575,6 @@ mono_profiler_gc_allocation (
        }
 
        FireEtwMonoProfilerGCAllocation (
-               clr_instance_get_id (),
                vtable_id,
                SGEN_POINTER_UNTAG_ALL (object),
                object_size,
@@ -4537,7 +4607,6 @@ mono_profiler_gc_moves (
                }
 
                FireEtwMonoProfilerGCMoves (
-                       clr_instance_get_id (),
                        G_N_ELEMENTS (data),
                        sizeof (GCObjectAddressData),
                        data,
@@ -4552,7 +4621,6 @@ mono_profiler_gc_moves (
                }
 
                FireEtwMonoProfilerGCMoves (
-                       clr_instance_get_id (),
                        data_rest,
                        sizeof (GCObjectAddressData),
                        data,
@@ -4572,7 +4640,6 @@ mono_profiler_gc_resize (
 
        // TODO: Needs to be async safe.
        /*FireEtwMonoProfilerGCResize (
-               clr_instance_get_id (),
                (uint64_t)size,
                NULL,
                NULL);*/
@@ -4590,7 +4657,6 @@ mono_profiler_gc_handle_created (
                return;
 
        FireEtwMonoProfilerGCHandleCreated (
-               clr_instance_get_id (),
                handle,
                (uint8_t)type,
                SGEN_POINTER_UNTAG_ALL (object),
@@ -4609,7 +4675,6 @@ mono_profiler_gc_handle_deleted (
                return;
 
        FireEtwMonoProfilerGCHandleDeleted (
-               clr_instance_get_id (),
                handle,
                (uint8_t)type,
                NULL,
@@ -4624,7 +4689,6 @@ mono_profiler_gc_finalizing (MonoProfiler *prof)
                return;
 
        FireEtwMonoProfilerGCFinalizing (
-               clr_instance_get_id (),
                NULL,
                NULL);
 }
@@ -4637,7 +4701,6 @@ mono_profiler_gc_finalized (MonoProfiler *prof)
                return;
 
        FireEtwMonoProfilerGCFinalized (
-               clr_instance_get_id (),
                NULL,
                NULL);
 }
@@ -4652,7 +4715,6 @@ mono_profiler_gc_finalizing_object (
                return;
 
        FireEtwMonoProfilerGCFinalizingObject (
-               clr_instance_get_id (),
                SGEN_POINTER_UNTAG_ALL (object),
                NULL,
                NULL);
@@ -4668,7 +4730,6 @@ mono_profiler_gc_finalized_object (
                return;
 
        FireEtwMonoProfilerGCFinalizedObject (
-               clr_instance_get_id (),
                SGEN_POINTER_UNTAG_ALL (object),
                NULL,
                NULL);
@@ -4688,7 +4749,6 @@ mono_profiler_gc_root_register (
                return;
 
        FireEtwMonoProfilerGCRootRegister (
-               clr_instance_get_id (),
                start,
                (uint64_t)size,
                (uint8_t) source,
@@ -4708,7 +4768,6 @@ mono_profiler_gc_root_unregister (
                return;
 
        FireEtwMonoProfilerGCRootUnregister (
-               clr_instance_get_id (),
                start,
                NULL,
                NULL);
@@ -4739,7 +4798,6 @@ mono_profiler_gc_roots (
                }
 
                FireEtwMonoProfilerGCRoots (
-                       clr_instance_get_id (),
                        G_N_ELEMENTS (data),
                        sizeof (GCAddressObjectData),
                        data,
@@ -4755,7 +4813,6 @@ mono_profiler_gc_roots (
                }
 
                FireEtwMonoProfilerGCRoots (
-                       clr_instance_get_id (),
                        data_rest,
                        sizeof (GCAddressObjectData),
                        data,
@@ -4774,7 +4831,6 @@ mono_profiler_monitor_contention (
                return;
 
        FireEtwMonoProfilerMonitorContention (
-               clr_instance_get_id (),
                SGEN_POINTER_UNTAG_ALL (object),
                NULL,
                NULL);
@@ -4790,7 +4846,6 @@ mono_profiler_monitor_failed (
                return;
 
        FireEtwMonoProfilerMonitorFailed (
-               clr_instance_get_id (),
                SGEN_POINTER_UNTAG_ALL (object),
                NULL,
                NULL);
@@ -4806,7 +4861,6 @@ mono_profiler_monitor_acquired (
                return;
 
        FireEtwMonoProfilerMonitorAcquired (
-               clr_instance_get_id (),
                SGEN_POINTER_UNTAG_ALL (object),
                NULL,
                NULL);
@@ -4822,7 +4876,6 @@ mono_profiler_thread_started (
                return;
 
        FireEtwMonoProfilerThreadStarted (
-               clr_instance_get_id (),
                (uint64_t)tid,
                NULL,
                NULL);
@@ -4838,7 +4891,6 @@ mono_profiler_thread_stopping (
                return;
 
        FireEtwMonoProfilerThreadStopping (
-               clr_instance_get_id (),
                (uint64_t)tid,
                NULL,
                NULL);
@@ -4854,7 +4906,6 @@ mono_profiler_thread_stopped (
                return;
 
        FireEtwMonoProfilerThreadStopped (
-               clr_instance_get_id (),
                (uint64_t)tid,
                NULL,
                NULL);
@@ -4870,7 +4921,6 @@ mono_profiler_thread_exited (
                return;
 
        FireEtwMonoProfilerThreadExited (
-               clr_instance_get_id (),
                (uint64_t)tid,
                NULL,
                NULL);
@@ -4887,7 +4937,6 @@ mono_profiler_thread_name (
                return;
 
        FireEtwMonoProfilerThreadName (
-               clr_instance_get_id (),
                (uint64_t)tid,
                (ep_char8_t *)(name ? name : ""),
                NULL,