From: Andrew Au Date: Fri, 29 Mar 2024 19:31:09 +0000 (-0700) Subject: Support collecting GC collect only trace using a simplified profile (#4568) X-Git-Tag: accepted/tizen/unified/20241231.014852~40^2~151 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88fdc1602dc8ef2add01b20fd70d0e5308ac8005;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Support collecting GC collect only trace using a simplified profile (#4568) --- diff --git a/src/Microsoft.Diagnostics.Monitoring.EventPipe/Configuration/GcCollectConfiguration.cs b/src/Microsoft.Diagnostics.Monitoring.EventPipe/Configuration/GcCollectConfiguration.cs new file mode 100644 index 000000000..6cd5a561c --- /dev/null +++ b/src/Microsoft.Diagnostics.Monitoring.EventPipe/Configuration/GcCollectConfiguration.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; +using Microsoft.Diagnostics.NETCore.Client; + +namespace Microsoft.Diagnostics.Monitoring.EventPipe +{ + public sealed class GcCollectConfiguration : MonitoringSourceConfiguration + { + public GcCollectConfiguration() + { + RequestRundown = false; + } + + public override IList GetProviders() => + new EventPipeProvider[] + { + new EventPipeProvider("Microsoft-Windows-DotNETRuntime", System.Diagnostics.Tracing.EventLevel.Informational, (long) Tracing.Parsers.ClrTraceEventParser.Keywords.GC), + new EventPipeProvider("Microsoft-Windows-DotNETRuntimePrivate", System.Diagnostics.Tracing.EventLevel.Informational, (long) Tracing.Parsers.ClrTraceEventParser.Keywords.GC), + }; + } +}