コード例 #1
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);
 }
コード例 #2
0
 internal static bool CBAMatchFoundIsEnabled()
 {
     if (!FxTrace.ShouldTraceVerbose)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceVerboseToTraceSource)
     {
         return(FxTrace.IsEventEnabled(0x11));
     }
     return(true);
 }
コード例 #3
0
 internal static bool AspNetRoutingServiceIsEnabled()
 {
     if (!FxTrace.ShouldTraceVerbose)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceVerboseToTraceSource)
     {
         return(FxTrace.IsEventEnabled(13));
     }
     return(true);
 }
コード例 #4
0
 internal static bool CBAEntryReadIsEnabled()
 {
     if (!FxTrace.ShouldTraceVerbose)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceVerboseToTraceSource)
     {
         return(FxTrace.IsEventEnabled(0x10));
     }
     return(true);
 }
コード例 #5
0
 internal static bool IncrementBusyCountIsEnabled()
 {
     if (!FxTrace.ShouldTraceVerbose)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceVerboseToTraceSource)
     {
         return(FxTrace.IsEventEnabled(20));
     }
     return(true);
 }
コード例 #6
0
 internal static bool HttpHandlerPickedForUrlIsEnabled()
 {
     if (!FxTrace.ShouldTraceInformation)
     {
         return(false);
     }
     if (!FxTrace.ShouldTraceInformationToTraceSource)
     {
         return(FxTrace.IsEventEnabled(0));
     }
     return(true);
 }
コード例 #7
0
 private static void EnsureEventDescriptors()
 {
     if (object.ReferenceEquals(TD.eventDescriptors, null))
     {
         EventDescriptor[] eventDescriptors = new EventDescriptor[] {
             new EventDescriptor(0x3ce8, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(0x1f5, 0, 20, 4, 1, 0x9c5, 0x800000000000080L), new EventDescriptor(0x1f6, 0, 20, 4, 2, 0x9c5, 0x800000000000080L), new EventDescriptor(0x1f7, 0, 20, 4, 1, 0x9c6, 0x800000000000080L), new EventDescriptor(0x1f8, 0, 20, 4, 2, 0x9c6, 0x800000000000080L), new EventDescriptor(0x1f9, 0, 20, 4, 1, 0x9c7, 0x800000000000080L), new EventDescriptor(0x1fa, 0, 20, 4, 2, 0x9c7, 0x800000000000080L), new EventDescriptor(0x1fb, 0, 20, 4, 1, 0x9c8, 0x800000000000080L), new EventDescriptor(0x1fc, 0, 20, 4, 2, 0x9c8, 0x800000000000080L), new EventDescriptor(0x1ff, 0, 20, 4, 1, 0, 0x800000000000080L), new EventDescriptor(0x200, 0, 20, 4, 2, 0, 0x800000000000080L), new EventDescriptor(0x201, 0, 20, 4, 1, 0, 0x800000000000080L), new EventDescriptor(0x202, 0, 20, 4, 2, 0, 0x800000000000080L), new EventDescriptor(0x25b, 0, 0x13, 5, 0, 0, 0x1000000000000000L), new EventDescriptor(0x25c, 0, 0x13, 5, 0, 0, 0x1000000000000000L), new EventDescriptor(0xd5, 0, 0x12, 0, 0, 0, 0x20000000000e0001L),
             new EventDescriptor(0x259, 0, 0x13, 5, 0, 0, 0x1000000000000000L), new EventDescriptor(0x25a, 0, 0x13, 5, 0, 0, 0x1000000000000000L), new EventDescriptor(0xde1, 0, 20, 4, 1, 0, 0x800000000000080L), new EventDescriptor(0xde2, 0, 20, 4, 2, 0, 0x800000000000080L), new EventDescriptor(0x25d, 0, 0x13, 5, 0, 0, 0x1000000000000000L), new EventDescriptor(0x25e, 0, 0x13, 5, 0, 0, 0x1000000000000000L)
         };
         FxTrace.UpdateEventDefinitions(eventDescriptors);
         TD.eventDescriptors = eventDescriptors;
     }
 }
コード例 #8
0
 static void CreateEventDescriptors()
 {
     System.Runtime.Diagnostics.EventDescriptor[] descriptors = new System.Runtime.Diagnostics.EventDescriptor[] {
         new System.Runtime.Diagnostics.EventDescriptor(501, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0xa13, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(502, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0xa13, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(503, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0xa15, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(504, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0xa15, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(505, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0xa14, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(506, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0xa14, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(507, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0x9f2, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(508, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0x9f2, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(513, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0xa2c, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(514, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0xa2c, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(603, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x0, 0x1000000000008000),
         new System.Runtime.Diagnostics.EventDescriptor(604, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x0, 0x1000000000008000),
         new System.Runtime.Diagnostics.EventDescriptor(213, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.LogAlways, (byte)TraceEventOpcode.Start, 0xa12, 0x20000000000E0001),
         new System.Runtime.Diagnostics.EventDescriptor(226, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.LogAlways, (byte)TraceEventOpcode.Info, 0xa19, 0x2000000000040080),
         new System.Runtime.Diagnostics.EventDescriptor(601, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x0, 0x1000000000000000),
         new System.Runtime.Diagnostics.EventDescriptor(602, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x0, 0x1000000000000000),
         new System.Runtime.Diagnostics.EventDescriptor(3553, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0xa32, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(3554, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0xa32, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(605, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0xa2c, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(606, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Stop, 0xa2c, 0x1000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(3558, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0xa0f, 0x2000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(3559, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0xa0f, 0x2000000000000080),
         new System.Runtime.Diagnostics.EventDescriptor(3560, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0xa00, 0x2000000000400000),
         new System.Runtime.Diagnostics.EventDescriptor(3561, 0, (byte)TraceChannel.Operational, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0x0, 0x4000000000000080)
     };
     // 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>(14);
     e2eEvents.Add(213);
     e2eEvents.Add(226);
     e2eEvents.Add(501);
     e2eEvents.Add(502);
     e2eEvents.Add(503);
     e2eEvents.Add(504);
     e2eEvents.Add(505);
     e2eEvents.Add(506);
     e2eEvents.Add(513);
     e2eEvents.Add(514);
     e2eEvents.Add(602);
     e2eEvents.Add(603);
     e2eEvents.Add(3558);
     e2eEvents.Add(3559);
     FxTrace.UpdateEventDefinitions(descriptors, e2eEvents.ToArray());
     eventDescriptors = descriptors;
 }
コード例 #9
0
 internal static bool ServiceHostFactoryCreationStopIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(4));
 }
コード例 #10
0
 internal static bool XamlServicesLoadStopIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(0x13));
 }
コード例 #11
0
 internal static bool WebHostRequestStopIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(12));
 }
コード例 #12
0
 internal static bool ServiceHostStartedIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(15));
 }
コード例 #13
0
 internal static bool ServiceHostOpenStopIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(10));
 }
コード例 #14
0
 internal static bool CompilationStopIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(2));
 }
コード例 #15
0
 private static bool IsEtwEventEnabled(int eventIndex)
 {
     EnsureEventDescriptors();
     return(FxTrace.IsEventEnabled(eventIndex));
 }
コード例 #16
0
 internal static bool HostedTransportConfigurationManagerConfigInitStopIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(8));
 }
コード例 #17
0
 internal static bool CreateServiceHostStopIsEnabled()
 {
     return(FxTrace.ShouldTraceInformation && FxTrace.IsEventEnabled(6));
 }