diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs index 558507211b17f..da0a5e6e437b5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs @@ -23,7 +23,8 @@ public static class Keywords public const EventKeywords ProcessorCount = (EventKeywords)0x2; } - internal static RuntimeEventSource? Log => new RuntimeEventSource(); + // this roots the singleton instance of the event source + internal static RuntimeEventSource Log { get; } = new RuntimeEventSource(); private PollingCounter? _gcHeapSizeCounter; private IncrementingPollingCounter? _gen0GCCounter; private IncrementingPollingCounter? _gen1GCCounter;