コード例 #1
0
 static void CreateEventDescriptors()
 {
     System.Runtime.Diagnostics.EventDescriptor[] descriptors = new System.Runtime.Diagnostics.EventDescriptor[] {
         new System.Runtime.Diagnostics.EventDescriptor(57398, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Warning, (byte)TraceEventOpcode.Info, 0xa22, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(3501, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)69, 0x9f4, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(3502, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)70, 0x9f4, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(3503, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Warning, (byte)28, 0x9db, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(3507, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0x9cb, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(440, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0xa1c, 0x2000000004080000),
         new System.Runtime.Diagnostics.EventDescriptor(441, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0xa1c, 0x2000000004080000),
         new System.Runtime.Diagnostics.EventDescriptor(3550, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)11, 0x9cc, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(3551, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)10, 0x9cc, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(3552, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Warning, (byte)TraceEventOpcode.Info, 0xa00, 0x2000000004400000),
         new System.Runtime.Diagnostics.EventDescriptor(3555, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0x9de, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(3556, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0x9de, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(3557, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa08, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(3508, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Verbose, (byte)124, 0xa25, 0x2000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(225, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0x9db, 0x2000000004080000),
         new System.Runtime.Diagnostics.EventDescriptor(2023, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)76, 0x9fa, 0x1000000001000000),
         new System.Runtime.Diagnostics.EventDescriptor(1450, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Send, 0xa2e, 0x1000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(1449, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Receive, 0xa2e, 0x1000000004000000),
         new System.Runtime.Diagnostics.EventDescriptor(1436, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0xa00, 0x2000000000400000)
     };
     // The hashcodes calculated from PTCop for TD.CreateEventDescriptors are unstable when just declaring
     // a local field of ushort[] if the array is non-empty and contains more than 2 entries, because
     // the c#-compiler is using some private types for optimization. The type name follows the following pattern:
     // <PrivateImplementationDetails>{6BAE93FD-290B-4DE0-BCEE-366B30800FDF} (where the GUID is changing with every build)
     // To scope the change to unblock PTCop as much as possible we wrap the list of End2EndEvents in a List<ushort>
     System.Collections.Generic.List <ushort> e2eEvents = new System.Collections.Generic.List <ushort>(3);
     e2eEvents.Add(1449);
     e2eEvents.Add(1450);
     e2eEvents.Add(3551);
     FxTrace.UpdateEventDefinitions(descriptors, e2eEvents.ToArray());
     eventDescriptors = descriptors;
 }
コード例 #2
0
 private static void EnsureEventDescriptors()
 {
     if (object.ReferenceEquals(TD.eventDescriptors, null))
     {
         EventDescriptor[] eventDescriptors = new EventDescriptor[] { new EventDescriptor(0xdad, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(0xdae, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(0xdaf, 0, 0x13, 3, 0, 0, 0x1000000000000000L), new EventDescriptor(0xdb3, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(440, 0, 0x12, 4, 1, 0, 0x2000000000080000L), new EventDescriptor(0x1b9, 0, 0x12, 4, 2, 0, 0x2000000000080000L), new EventDescriptor(0xdde, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(0xddf, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(0xde0, 0, 0x13, 3, 0, 0, 0x1000000000000000L), new EventDescriptor(0xde3, 0, 20, 4, 1, 0, 0x800000000000080L), new EventDescriptor(0xde4, 0, 20, 4, 2, 0, 0x800000000000080L), new EventDescriptor(0xde5, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(0xdb4, 0, 0x13, 5, 0, 0, 0x1000000000000000L), new EventDescriptor(0xe1, 0, 0x12, 4, 0, 0, 0x2000000000080004L) };
         FxTrace.UpdateEventDefinitions(eventDescriptors);
         TD.eventDescriptors = eventDescriptors;
     }
 }
コード例 #3
0
 /// <summary>
 /// Check if ETW tracing is enabled for the particular event
 /// </summary>
 /// <param name="eventIndex">The index of the event descriptor</param>
 static bool IsEtwEventEnabled(int eventIndex)
 {
     if (FxTrace.Trace.IsEtwProviderEnabled)
     {
         EnsureEventDescriptors();
         return(FxTrace.IsEventEnabled(eventIndex));
     }
     return(false);
 }
コード例 #4
0
 internal static bool BufferOutOfOrderMessageNoInstanceIsEnabled()
 {
     if (!FxTrace.ShouldTraceInformation)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceInformationToTraceSource)
     {
         return(FxTrace.IsEventEnabled(6));
     }
     return(true);
 }
コード例 #5
0
 internal static bool TransactedReceiveScopeEndCommitFailedIsEnabled()
 {
     if (!FxTrace.ShouldTraceInformation)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceInformationToTraceSource)
     {
         return(FxTrace.IsEventEnabled(11));
     }
     return(true);
 }
コード例 #6
0
 internal static bool TrackingProfileNotFoundIsEnabled()
 {
     if (!FxTrace.ShouldTraceVerbose)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceVerboseToTraceSource)
     {
         return(FxTrace.IsEventEnabled(12));
     }
     return(true);
 }
コード例 #7
0
 internal static bool TraceCorrelationKeysIsEnabled()
 {
     if (!FxTrace.ShouldTraceInformation)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceInformationToTraceSource)
     {
         return(FxTrace.IsEventEnabled(13));
     }
     return(true);
 }
コード例 #8
0
 internal static bool StopSignpostEventIsEnabled()
 {
     if (!FxTrace.ShouldTraceInformation)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceInformationToTraceSource)
     {
         return(FxTrace.IsEventEnabled(5));
     }
     return(true);
 }
コード例 #9
0
 internal static bool ServiceEndpointAddedIsEnabled()
 {
     if (!FxTrace.ShouldTraceInformation)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceInformationToTraceSource)
     {
         return(FxTrace.IsEventEnabled(3));
     }
     return(true);
 }
コード例 #10
0
 internal static bool MaxPendingMessagesPerChannelExceededIsEnabled()
 {
     if (!FxTrace.ShouldTraceWarning)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceWarningToTraceSource)
     {
         return(FxTrace.IsEventEnabled(8));
     }
     return(true);
 }
コード例 #11
0
 internal static bool InferredOperationDescriptionIsEnabled()
 {
     if (!FxTrace.ShouldTraceInformation)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceInformationToTraceSource)
     {
         return(FxTrace.IsEventEnabled(1));
     }
     return(true);
 }
コード例 #12
0
 internal static bool DuplicateCorrelationQueryIsEnabled()
 {
     if (!FxTrace.ShouldTraceWarning)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceWarningToTraceSource)
     {
         return(FxTrace.IsEventEnabled(2));
     }
     return(true);
 }
コード例 #13
0
 internal static bool CreateWorkflowServiceHostStartIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(9));
 }
コード例 #14
0
 private static bool IsEtwEventEnabled(int eventIndex)
 {
     EnsureEventDescriptors();
     return(FxTrace.IsEventEnabled(eventIndex));
 }