コード例 #1
0
 internal static void TraceOperationCreation(CausalityTraceLevel traceLevel, int taskId, string operationName, ulong relatedContext)
 {
     if (LoggingOn)
     {
         s_TracerFactory.TraceOperationCreation((WFD.CausalityTraceLevel)traceLevel, s_CausalitySource, s_PlatformId, GetOperationId((uint)taskId), operationName, relatedContext);
     }
 }
コード例 #2
0
 [MethodImplAttribute(MethodImplOptions.NoInlining)] // Tracking is slow path. Disable inlining for it.
 internal static void TraceOperationCreation(CausalityTraceLevel traceLevel, int taskId, string operationName, ulong relatedContext)
 {
     try
     {
         if ((f_LoggingOn & Loggers.ETW) != 0)
         {
             TplEtwProvider.Log.TraceOperationBegin(taskId, operationName, (long)relatedContext);
         }
         if ((f_LoggingOn & Loggers.CausalityTracer) != 0)
         {
             s_TracerFactory.TraceOperationCreation((WFD.CausalityTraceLevel)traceLevel, s_CausalitySource, s_PlatformId, GetOperationId((uint)taskId), operationName, relatedContext);
         }
     }
     catch (Exception ex)
     {
         //view function comment
         LogAndDisable(ex);
     }
 }
コード例 #3
0
 internal static void TraceOperationCreation(Task task, string operationName)
 {
     try
     {
         int taskId = task.Id;
         if ((f_LoggingOn & Loggers.ETW) != 0)
         {
             TplEventSource.Log.TraceOperationBegin(taskId, operationName, RelatedContext: 0);
         }
         if ((f_LoggingOn & Loggers.CausalityTracer) != 0)
         {
             s_TracerFactory.TraceOperationCreation(WFD.CausalityTraceLevel.Required, s_CausalitySource, s_PlatformId, GetOperationId((uint)taskId), operationName, relatedContext: 0);
         }
     }
     catch (Exception ex)
     {
         //view function comment
         LogAndDisable(ex);
     }
 }