Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 5018582

Browse files
authored
Port EventPipe Out-of-Process Control to Release/2.2 (#20303)
1 parent 1e07644 commit 5018582

17 files changed

+648
-306
lines changed

src/inc/clrconfigvalues.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,10 @@ RETAIL_CONFIG_DWORD_INFO(EXTERNAL_AllowDComReflection, W("AllowDComReflection"),
742742
// EventPipe
743743
//
744744
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EnableEventPipe, W("EnableEventPipe"), 0, "Enable/disable event pipe. Non-zero values enable tracing.")
745-
RETAIL_CONFIG_STRING_INFO(INTERNAL_EventPipeOutputFile, W("EventPipeOutputFile"), "The full path including file name for the trace file that will be written when COMPlus_EnableEventPipe&=1")
745+
RETAIL_CONFIG_STRING_INFO(INTERNAL_EventPipeOutputPath, W("EventPipeOutputPath"), "The full path excluding file name for the trace file that will be written when COMPlus_EnableEventPipe=1")
746746
RETAIL_CONFIG_STRING_INFO(INTERNAL_EventPipeConfig, W("EventPipeConfig"), "Configuration for EventPipe.")
747747
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeRundown, W("EventPipeRundown"), 1, "Enable/disable eventpipe rundown.")
748+
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeCircularMB, W("EventPipeCircularMB"), 1024, "The EventPipe circular buffer size in megabytes.")
748749

749750
#ifdef FEATURE_GDBJIT
750751
///

src/mscorlib/System.Private.CoreLib.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@
526526
<Compile Include="$(IntermediateOutputPath)..\eventing\DotNETRuntimeEventSource.cs" />
527527
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\DotNETRuntimeEventSource.cs" />
528528
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipe.cs" />
529+
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipeController.cs" />
529530
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipeEventDispatcher.cs" />
530531
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipeEventProvider.cs" />
531532
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipeMetadataGenerator.cs" />
@@ -552,6 +553,9 @@
552553
<Compile Include="$(BclSourcesRoot)\System\Runtime\Serialization\FormatterServices.cs" />
553554
<Compile Include="$(BclSourcesRoot)\System\Runtime\Serialization\SerializationInfo.cs" />
554555
</ItemGroup>
556+
<ItemGroup>
557+
<Compile Include="$(BclSourcesRoot)\System\Runtime\Versioning\CompatibilitySwitch.cs" />
558+
</ItemGroup>
555559
<ItemGroup>
556560
<Compile Include="$(BclSourcesRoot)\Microsoft\Win32\UnsafeNativeMethods.cs" />
557561
<Compile Include="$(BclSourcesRoot)\Microsoft\Win32\Win32Native.cs" />
@@ -592,7 +596,6 @@
592596
<Compile Include="$(BclSourcesRoot)\Interop\Unix\Interop.Libraries.cs" />
593597
<Compile Include="$(BclSourcesRoot)\System\Globalization\CultureInfo.Unix.cs" />
594598
<Compile Include="$(BclSourcesRoot)\System\Globalization\GlobalizationMode.Unix.cs" />
595-
<Compile Include="$(BclSourcesRoot)\System\Runtime\Versioning\CompatibilitySwitch.cs" />
596599
<Compile Include="$(BclSourcesRoot)\System\Threading\ClrThreadPoolBoundHandle.Unix.cs" />
597600
</ItemGroup>
598601
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">

src/mscorlib/src/System/Diagnostics/Eventing/EventPipe.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,19 @@ internal void EnableProvider(string providerName, ulong keywords, uint loggingLe
127127
loggingLevel));
128128
}
129129

130+
private void EnableProviderConfiguration(EventPipeProviderConfiguration providerConfig)
131+
{
132+
m_providers.Add(providerConfig);
133+
}
134+
135+
internal void EnableProviderRange(EventPipeProviderConfiguration[] providerConfigs)
136+
{
137+
foreach(EventPipeProviderConfiguration config in providerConfigs)
138+
{
139+
EnableProviderConfiguration(config);
140+
}
141+
}
142+
130143
internal void SetProfilerSamplingRate(TimeSpan minTimeBetweenSamples)
131144
{
132145
if(minTimeBetweenSamples.Ticks <= 0)

0 commit comments

Comments
 (0)