diff options
author | Johan Lorensson <lateralusx.github@gmail.com> | 2021-06-03 13:18:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 13:18:24 +0300 |
commit | f18f41b14816f02877c721d99ccc761967748184 (patch) | |
tree | f899372dd96e4e7b7f80d9a47d9b94cd93fa1eb7 /src/coreclr/vm | |
parent | 3e1ddb05cd2a1f14729df91c8c429f3047a4b569 (diff) |
Add Execution Checkpoint EventPipe event used to track runtime init on Mono. (#53024)
Diffstat (limited to 'src/coreclr/vm')
-rw-r--r-- | src/coreclr/vm/ClrEtwAll.man | 60 | ||||
-rw-r--r-- | src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h | 6 | ||||
-rw-r--r-- | src/coreclr/vm/eventing/eventpipe/ep-rt-types-coreclr.h | 6 |
3 files changed, 70 insertions, 2 deletions
diff --git a/src/coreclr/vm/ClrEtwAll.man b/src/coreclr/vm/ClrEtwAll.man index f27bf4feb2f..79e1f17b069 100644 --- a/src/coreclr/vm/ClrEtwAll.man +++ b/src/coreclr/vm/ClrEtwAll.man @@ -422,7 +422,14 @@ <opcode name="InstrumentationDataVerbose" message="$(string.RuntimePublisher.InstrumentationDataOpcodeMessage)" symbol="CLR_INSTRUMENTATION_DATA_VERBOSE_OPCODE" value="12"/> </opcodes> </task> - <!--Next available ID is 35--> + <task name="ExecutionCheckpoint" symbol="CLR_EXECUTION_CHECKPOINT_TASK" + value="35" eventGUID="{598832C8-DF4D-4E9E-ABE6-2C7BF0BA2DA2}" + message="$(string.RuntimePublisher.ExecutionCheckpointTaskMessage)"> + <opcodes> + <opcode name="ExecutionCheckpoint" message="$(string.RuntimePublisher.ExecutionCheckpointOpcodeMessage)" symbol="CLR_EXECUTIONCHECKPOINT_OPCODE" value="11"> </opcode> + </opcodes> + </task> + <!--Next available ID is 36--> </tasks> <!--Maps--> <maps> @@ -2876,6 +2883,19 @@ </Settings> </UserData> </template> + + <template tid="ExecutionCheckpoint"> + <data name="ClrInstanceID" inType="win:UInt16" /> + <data name="Name" inType="win:UnicodeString" /> + <data name="Timestamp" inType="win:Int64" /> + <UserData> + <ExecutionCheckpoint xmlns="myNs"> + <ClrInstanceID> %1 </ClrInstanceID> + <Name> %2 </Name> + <Timestamp> %3 </Timestamp> + </ExecutionCheckpoint> + </UserData> + </template> </templates> <events> @@ -3900,6 +3920,11 @@ keywords ="JitInstrumentationDataKeyword" opcode="InstrumentationDataVerbose" task="JitInstrumentationData" symbol="JitInstrumentationDataVerbose" message="$(string.RuntimePublisher.JitInstrumentationDataEventMessage)"/> + + <!-- Execution Checkpoint event 300 --> + <event value="300" version="0" level="win:Informational" template="ExecutionCheckpoint" + keywords ="PerfTrackKeyword" opcode="ExecutionCheckpoint" task="ExecutionCheckpoint" symbol="ExecutionCheckpoint" + message="$(string.RuntimePublisher.ExecutionCheckpointEventMessage)"/> </events> </provider> @@ -4006,6 +4031,14 @@ <opcode name="SettingsDCStart" message="$(string.RundownPublisher.TieredCompilationSettingsDCStartOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_SETTINGS_DCSTART_OPCODE" value="11"/> </opcodes> </task> + + <task name="ExecutionCheckpointRundown" symbol="CLR_EXECUTION_CHECKPOINT_RUNDOWN_TASK" + value="35" eventGUID="{DFF63ECA-ADAA-431F-8F91-72820C7217DB}" + message="$(string.RundownPublisher.ExecutionCheckpointTaskMessage)"> + <opcodes> + <opcode name="ExecutionCheckpointDCEnd" message="$(string.RundownPublisher.ExecutionCheckpointDCEndOpcodeMessage)" symbol="CLR_EXECUTIONCHECKPOINT_DCSTART_OPCODE" value="11"/> + </opcodes> + </task> </tasks> <maps> @@ -4540,6 +4573,19 @@ </Settings> </UserData> </template> + + <template tid="ExecutionCheckpointRundown"> + <data name="ClrInstanceID" inType="win:UInt16" /> + <data name="Name" inType="win:UnicodeString" /> + <data name="Timestamp" inType="win:Int64" /> + <UserData> + <ExecutionCheckpointRundown xmlns="myNs"> + <ClrInstanceID> %1 </ClrInstanceID> + <Name> %2 </Name> + <Timestamp> %3 </Timestamp> + </ExecutionCheckpointRundown> + </UserData> + </template> </templates> <events> @@ -4778,6 +4824,11 @@ <event value="280" version="0" level="win:Informational" template="TieredCompilationSettings" keywords="CompilationKeyword" task="TieredCompilationRundown" opcode="SettingsDCStart" symbol="TieredCompilationSettingsDCStart" message="$(string.RundownPublisher.TieredCompilationSettingsDCStartEventMessage)"/> + + <!-- Execution Checkpoint event 300 --> + <event value="300" version="0" level="win:Informational" template="ExecutionCheckpointRundown" + opcode="ExecutionCheckpointDCEnd" task="ExecutionCheckpointRundown" + symbol="ExecutionCheckpointDCEnd" message="$(string.RundownPublisher.ExecutionCheckpointDCEndEventMessage)"/> </events> </provider> @@ -7164,6 +7215,7 @@ <string id="RuntimePublisher.TieredCompilationResumeEventMessage" value="ClrInstanceID=%1;%nNewMethodCount=%2" /> <string id="RuntimePublisher.TieredCompilationBackgroundJitStartEventMessage" value="ClrInstanceID=%1;%nPendingMethodCount=%2" /> <string id="RuntimePublisher.TieredCompilationBackgroundJitStopEventMessage" value="ClrInstanceID=%1;%nPendingMethodCount=%2;%nJittedMethodCount=%3" /> + <string id="RuntimePublisher.ExecutionCheckpointEventMessage" value="ClrInstanceID=%1;Checkpoint=%2;Timestamp=%3"/> <string id="RundownPublisher.MethodDCStartEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" /> <string id="RundownPublisher.MethodDCStart_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" /> @@ -7208,6 +7260,7 @@ <string id="RundownPublisher.ModuleRangeDCStartEventMessage" value="ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5" /> <string id="RundownPublisher.ModuleRangeDCEndEventMessage" value= "ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5" /> <string id="RundownPublisher.TieredCompilationSettingsDCStartEventMessage" value="ClrInstanceID=%1;%nFlags=%2" /> + <string id="RundownPublisher.ExecutionCheckpointDCEndEventMessage" value="ClrInstanceID=%1;Checkpoint=%2;Timestamp=%3"/> <string id="StressPublisher.StressLogEventMessage" value="Facility=%1;%nLevel=%2;%nMessage=%3" /> <string id="StressPublisher.StressLog_V1EventMessage" value="Facility=%1;%nLevel=%2;%nMessage=%3;%nClrInstanceID=%4" /> @@ -7329,6 +7382,7 @@ <string id="RuntimePublisher.AssemblyLoaderTaskMessage" value="AssemblyLoader" /> <string id="RuntimePublisher.TypeLoadTaskMessage" value="TypeLoad" /> <string id="RuntimePublisher.JitInstrumentationDataTaskMessage" value="JitInstrumentationData" /> + <string id="RuntimePublisher.ExecutionCheckpointTaskMessage" value="ExecutionCheckpoint" /> <string id="RundownPublisher.EEStartupTaskMessage" value="Runtime" /> <string id="RundownPublisher.MethodTaskMessage" value="Method" /> @@ -7336,6 +7390,7 @@ <string id="RundownPublisher.StackTaskMessage" value="ClrStack" /> <string id="RundownPublisher.PerfTrackTaskMessage" value="ClrPerfTrack" /> <string id="RundownPublisher.TieredCompilationTaskMessage" value="TieredCompilation" /> + <string id="RundownPublisher.ExecutionCheckpointTaskMessage" value="ExecutionCheckpoint" /> <string id="PrivatePublisher.GarbageCollectionTaskMessage" value="GC" /> <string id="PrivatePublisher.StartupTaskMessage" value="Startup"/> @@ -7798,6 +7853,8 @@ <string id="RuntimePublisher.InstrumentationDataOpcodeMessage" value="InstrumentationData" /> + <string id="RuntimePublisher.ExecutionCheckpointOpcodeMessage" value="ExecutionCheckpoint" /> + <string id="RundownPublisher.MethodDCStartOpcodeMessage" value="DCStart" /> <string id="RundownPublisher.MethodDCEndOpcodeMessage" value="DCStop" /> <string id="RundownPublisher.MethodDCStartVerboseOpcodeMessage" value="DCStartVerbose" /> @@ -7821,6 +7878,7 @@ <string id="RundownPublisher.ModuleRangeDCStartOpcodeMessage" value="ModuleRangeDCStart" /> <string id="RundownPublisher.ModuleRangeDCEndOpcodeMessage" value="ModuleRangeDCEnd" /> <string id="RundownPublisher.TieredCompilationSettingsDCStartOpcodeMessage" value="SettingsDCStart" /> + <string id="RundownPublisher.ExecutionCheckpointDCEndOpcodeMessage" value="ExecutionCheckpointDCEnd" /> <string id="PrivatePublisher.FailFastOpcodeMessage" value="FailFast" /> diff --git a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h index da3ff470670..a6400416a4e 100644 --- a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h +++ b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h @@ -1235,6 +1235,9 @@ ep_rt_atomic_compare_exchange_size_t (volatile size_t *target, size_t expected, EP_RT_DEFINE_ARRAY (session_id_array, ep_rt_session_id_array_t, ep_rt_session_id_array_iterator_t, EventPipeSessionID) EP_RT_DEFINE_ARRAY_ITERATOR (session_id_array, ep_rt_session_id_array_t, ep_rt_session_id_array_iterator_t, EventPipeSessionID) +EP_RT_DEFINE_ARRAY (execution_checkpoint_array, ep_rt_execution_checkpoint_array_t, ep_rt_execution_checkpoint_array_iterator_t, EventPipeExecutionCheckpoint *) +EP_RT_DEFINE_ARRAY_ITERATOR (execution_checkpoint_array, ep_rt_execution_checkpoint_array_t, ep_rt_execution_checkpoint_array_iterator_t, EventPipeExecutionCheckpoint *) + static void ep_rt_init (void) @@ -1898,10 +1901,11 @@ ep_rt_is_running (void) static inline void -ep_rt_execute_rundown (void) +ep_rt_execute_rundown (ep_rt_execution_checkpoint_array_t *execution_checkpoints) { STATIC_CONTRACT_NOTHROW; + //TODO: Write execution checkpoint rundown events. if (CLRConfig::GetConfigValue (CLRConfig::INTERNAL_EventPipeRundown) > 0) { // Ask the runtime to emit rundown events. if (g_fEEStarted && !g_fEEShutDown) diff --git a/src/coreclr/vm/eventing/eventpipe/ep-rt-types-coreclr.h b/src/coreclr/vm/eventing/eventpipe/ep-rt-types-coreclr.h index e81be5c7791..5fd1ba2fa8c 100644 --- a/src/coreclr/vm/eventing/eventpipe/ep-rt-types-coreclr.h +++ b/src/coreclr/vm/eventing/eventpipe/ep-rt-types-coreclr.h @@ -267,6 +267,12 @@ typedef struct _rt_coreclr_array_iterator_internal_t<EventPipeSessionID> ep_rt_s #undef ep_rt_method_desc_t typedef class MethodDesc ep_rt_method_desc_t; +#undef ep_rt_execution_checkpoint_array_t +typedef struct _rt_coreclr_array_internal_t<EventPipeExecutionCheckpoint *> ep_rt_execution_checkpoint_array_t; + +#undef ep_rt_execution_checkpoint_array_iterator_t +typedef struct _rt_coreclr_array_iterator_internal_t<EventPipeExecutionCheckpoint *> ep_rt_execution_checkpoint_array_iterator_t; + /* * PAL. */ |