diff options
author | Sung Yoon Whang <suwhang@microsoft.com> | 2019-02-12 11:53:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 11:53:39 -0800 |
commit | c4007d88a0c556182f70d7714e5b55cca92331a0 (patch) | |
tree | 5c460f9cab3ea0d846847573b18cfa92cc282297 | |
parent | 6e35bf13deec46f20e5468e5345f412734a35ef8 (diff) | |
download | coreclr-c4007d88a0c556182f70d7714e5b55cca92331a0.tar.gz coreclr-c4007d88a0c556182f70d7714e5b55cca92331a0.tar.bz2 coreclr-c4007d88a0c556182f70d7714e5b55cca92331a0.zip |
Renaming RuntimeEventSource to NativeRuntimeEventSource (#22533)
* Renaming RuntimeEventSource to NativeRuntimeEventSource
* missed a couple of comments and XPlatEventLogger
* rename DotNETRuntimeEventSource.cs to NativeRuntimeEventSource.cs
* use condition= instead of ifdef
* removing ifdef from NativeRuntimeEventSource.cs
* Fix case for 'eventing' directory in csproj
* Fix unix builds
* This should fix unix build...
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | build.cmd | 2 | ||||
-rwxr-xr-x | build.sh | 2 | ||||
-rw-r--r-- | src/System.Private.CoreLib/System.Private.CoreLib.csproj | 4 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs | 10 | ||||
-rw-r--r-- | src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipeEventDispatcher.cs | 6 | ||||
-rw-r--r-- | src/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.cs (renamed from src/System.Private.CoreLib/src/System/Diagnostics/Eventing/DotNETRuntimeEventSource.cs) | 14 | ||||
-rw-r--r-- | src/System.Private.CoreLib/src/System/Diagnostics/Eventing/XplatEventLogger.cs | 4 | ||||
-rw-r--r-- | src/scripts/genRuntimeEventSources.py | 4 |
9 files changed, 23 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d988ef258c..b7715d2b0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ endif (WIN32) set(CLR_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(VM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/vm) set(GENERATED_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/inc) -set(GENERATED_EVENTING_DIR ${CMAKE_CURRENT_BINARY_DIR}/eventing) +set(GENERATED_EVENTING_DIR ${CMAKE_CURRENT_BINARY_DIR}/Eventing) set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/version.c") set(PAL_REDEFINES_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/dlls/mscordac/palredefines.S) @@ -414,7 +414,7 @@ REM === REM ========================================================================================= set __IntermediatesIncDir=%__IntermediatesDir%\src\inc -set __IntermediatesEventingDir=%__IntermediatesDir%\eventing +set __IntermediatesEventingDir=%__IntermediatesDir%\Eventing REM Find python and set it to the variable PYTHON echo import sys; sys.stdout.write(sys.executable) | (py -3 || py -2 || python3 || python2 || python) > %TEMP%\pythonlocation.txt 2> NUL @@ -223,7 +223,7 @@ generate_event_logging_sources() __ConsumingBuildSystem=$2 __OutputIncDir="$__OutputDir/src/inc" - __OutputEventingDir="$__OutputDir/eventing" + __OutputEventingDir="$__OutputDir/Eventing" __OutputEventProviderDir="$__OutputEventingDir/eventprovider" echo "Laying out dynamically generated files consumed by $__ConsumingBuildSystem" diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj index 62da9c9160..b5804d6e78 100644 --- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -139,7 +139,7 @@ <Compile Include="$(BclSourcesRoot)\System\Delegate.cs" /> <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Debugger.cs" /> <Compile Include="$(BclSourcesRoot)\System\Diagnostics\EditAndContinueHelper.cs" /> - <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\DotNETRuntimeEventSource.cs" /> + <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\NativeRuntimeEventSource.cs" Condition="'$(FeaturePerfTracing)' == 'true'"/> <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipe.cs" /> <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipeController.cs" /> <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipeEventDispatcher.cs" /> @@ -280,7 +280,7 @@ </ItemGroup> <ItemGroup> <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\XplatEventLogger.cs" Condition="'$(FeatureXplatEventSource)' == 'true'" /> - <Compile Include="$(IntermediateOutputPath)..\eventing\DotNETRuntimeEventSource.cs" /> + <Compile Include="$(IntermediateOutputPath)..\Eventing\NativeRuntimeEventSource.cs" Condition="'$(FeaturePerfTracing)' == 'true'"/> </ItemGroup> <ItemGroup Condition="'$(FeatureCominterop)' == 'true'"> <Compile Include="$(BclSourcesRoot)\Internal\Runtime\InteropServices\WindowsRuntime\ExceptionSupport.cs" /> diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs index 8159bad6b2..d653e95995 100644 --- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs +++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs @@ -3874,10 +3874,10 @@ namespace System.Diagnostics.Tracing static EventListener() { #if FEATURE_PERFTRACING - // Ensure that RuntimeEventSource is initialized so that EventListeners get an opportunity to subscribe to its events. - // This is required because RuntimeEventSource never emit events on its own, and thus will never be initialized + // Ensure that NativeRuntimeEventSource is initialized so that EventListeners get an opportunity to subscribe to its events. + // This is required because NativeRuntimeEventSource never emit events on its own, and thus will never be initialized // in the normal way that EventSources are initialized. - GC.KeepAlive(RuntimeEventSource.Log); + GC.KeepAlive(NativeRuntimeEventSource.Log); #endif // FEATURE_PERFTRACING } @@ -3989,7 +3989,7 @@ namespace System.Diagnostics.Tracing eventSource.SendCommand(this, EventProviderType.None, 0, 0, EventCommand.Update, true, level, matchAnyKeyword, arguments); #if FEATURE_PERFTRACING - if (eventSource.GetType() == typeof(RuntimeEventSource)) + if (eventSource.GetType() == typeof(NativeRuntimeEventSource)) { EventPipeEventDispatcher.Instance.SendCommand(this, EventCommand.Update, true, level, matchAnyKeyword); } @@ -4010,7 +4010,7 @@ namespace System.Diagnostics.Tracing eventSource.SendCommand(this, EventProviderType.None, 0, 0, EventCommand.Update, false, EventLevel.LogAlways, EventKeywords.None, null); #if FEATURE_PERFTRACING - if (eventSource.GetType() == typeof(RuntimeEventSource)) + if (eventSource.GetType() == typeof(NativeRuntimeEventSource)) { EventPipeEventDispatcher.Instance.SendCommand(this, EventCommand.Update, false, EventLevel.LogAlways, EventKeywords.None); } diff --git a/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipeEventDispatcher.cs b/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipeEventDispatcher.cs index a5b5922932..9f459891a7 100644 --- a/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipeEventDispatcher.cs +++ b/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipeEventDispatcher.cs @@ -39,7 +39,7 @@ namespace System.Diagnostics.Tracing private EventPipeEventDispatcher() { // Get the ID of the runtime provider so that it can be used as a filter when processing events. - m_RuntimeProviderID = EventPipeInternal.GetProvider(RuntimeEventSource.EventSourceName); + m_RuntimeProviderID = EventPipeInternal.GetProvider(NativeRuntimeEventSource.EventSourceName); } internal void SendCommand(EventListener eventListener, EventCommand command, bool enable, EventLevel level, EventKeywords matchAnyKeywords) @@ -107,7 +107,7 @@ namespace System.Diagnostics.Tracing // Enable the EventPipe session. EventPipeProviderConfiguration[] providerConfiguration = new EventPipeProviderConfiguration[] { - new EventPipeProviderConfiguration(RuntimeEventSource.EventSourceName, (ulong) aggregatedKeywords, (uint) highestLevel, null) + new EventPipeProviderConfiguration(NativeRuntimeEventSource.EventSourceName, (ulong) aggregatedKeywords, (uint) highestLevel, null) }; m_sessionID = EventPipeInternal.Enable(null, 1024, 1, providerConfiguration, 1, 0); @@ -170,7 +170,7 @@ namespace System.Diagnostics.Tracing // Dispatch the event. ReadOnlySpan<Byte> payload = new ReadOnlySpan<byte>((void*)instanceData.Payload, (int)instanceData.PayloadLength); DateTime dateTimeStamp = TimeStampToDateTime(instanceData.TimeStamp); - RuntimeEventSource.Log.ProcessEvent(instanceData.EventID, instanceData.ThreadID, dateTimeStamp, instanceData.ActivityId, instanceData.ChildActivityId, payload); + NativeRuntimeEventSource.Log.ProcessEvent(instanceData.EventID, instanceData.ThreadID, dateTimeStamp, instanceData.ActivityId, instanceData.ChildActivityId, payload); } } diff --git a/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/DotNETRuntimeEventSource.cs b/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.cs index 604d7c5581..ecdee56017 100644 --- a/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/DotNETRuntimeEventSource.cs +++ b/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.cs @@ -4,21 +4,20 @@ namespace System.Diagnostics.Tracing { -#if FEATURE_PERFTRACING /// <summary> - /// RuntimeEventSource is an EventSource that represents the ETW/EventPipe events emitted by the native runtime. - /// Most of RuntimeEventSource is auto-generated by scripts/genRuntimeEventSources.py based on the contents of the Microsoft-Windows-DotNETRuntime provider. + /// NativeRuntimeEventSource is an EventSource that represents the ETW/EventPipe events emitted by the native runtime. + /// Most of NativeRuntimeEventSource is auto-generated by scripts/genRuntimeEventSources.py based on the contents of the Microsoft-Windows-DotNETRuntime provider. /// </summary> [EventSource(Guid = "5E5BB766-BBFC-5662-0548-1D44FAD9BB56", Name = "Microsoft-Windows-DotNETRuntime")] - internal sealed partial class RuntimeEventSource : EventSource + internal sealed partial class NativeRuntimeEventSource : EventSource { - // The RuntimeEventSource GUID is {5e5bb766-bbfc-5662-0548-1d44fad9bb56} - private RuntimeEventSource() : base(new Guid(0x5e5bb766, 0xbbfc, 0x5662, 0x05, 0x48, 0x1d, 0x44, 0xfa, 0xd9, 0xbb, 0x56), "Microsoft-Windows-DotNETRuntime") { } + // The NativeRuntimeEventSource GUID is {5e5bb766-bbfc-5662-0548-1d44fad9bb56} + private NativeRuntimeEventSource() : base(new Guid(0x5e5bb766, 0xbbfc, 0x5662, 0x05, 0x48, 0x1d, 0x44, 0xfa, 0xd9, 0xbb, 0x56), "Microsoft-Windows-DotNETRuntime") { } /// <summary> /// Dispatch a single event with the specified event ID and payload. /// </summary> - /// <param name="eventID">The eventID corresponding to the event as defined in the auto-generated portion of the RuntimeEventSource class.</param> + /// <param name="eventID">The eventID corresponding to the event as defined in the auto-generated portion of the NativeRuntimeEventSource class.</param> /// <param name="payload">A span pointing to the data payload for the event.</param> [NonEvent] internal unsafe void ProcessEvent(uint eventID, uint osThreadID, DateTime timeStamp, Guid activityId, Guid childActivityId, ReadOnlySpan<Byte> payload) @@ -40,5 +39,4 @@ namespace System.Diagnostics.Tracing args: decodedPayloadFields); } } -#endif // FEATURE_PERFTRACING } diff --git a/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/XplatEventLogger.cs b/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/XplatEventLogger.cs index 54238aff51..8545a18045 100644 --- a/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/XplatEventLogger.cs +++ b/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/XplatEventLogger.cs @@ -156,8 +156,8 @@ namespace System.Diagnostics.Tracing internal protected override void OnEventSourceCreated(EventSource eventSource) { - // Don't enable forwarding of RuntimeEventSource events.` - if (eventSource.GetType() == typeof(RuntimeEventSource)) + // Don't enable forwarding of NativeRuntimeEventSource events.` + if (eventSource.GetType() == typeof(NativeRuntimeEventSource)) { return; } diff --git a/src/scripts/genRuntimeEventSources.py b/src/scripts/genRuntimeEventSources.py index 014abcbc1c..5697d65a91 100644 --- a/src/scripts/genRuntimeEventSources.py +++ b/src/scripts/genRuntimeEventSources.py @@ -26,11 +26,11 @@ This file is generated by <root>/src/scripts/genRuntimeEventSources.py # START CONFIGURATION ######################################################################## manifestsToGenerate = { - "Microsoft-Windows-DotNETRuntime" : "DotNETRuntimeEventSource.cs" + "Microsoft-Windows-DotNETRuntime" : "NativeRuntimeEventSource.cs" } providerNameToClassNameMap = { - "Microsoft-Windows-DotNETRuntime" : "RuntimeEventSource" + "Microsoft-Windows-DotNETRuntime" : "NativeRuntimeEventSource" } manifestTypeToCSharpTypeMap = { |