Esempio n. 1
0
 private void HandleThreadStart(ThreadTraceData data)
 {
     if (data.ProcessID == pid)
     {
         traceOutput.Write(data.TimeStampRelativeMSec, data.ProcessID, data.ThreadID, data.EventName,
                           $"{data.ParentProcessID} ({data.ParentThreadID})");
     }
 }
 private void HandleThreadStart(ThreadTraceData data)
 {
     if (data.ProcessID == pid)
     {
         traceOutput.WriteLine($"{data.TimeStampRelativeMSec:0.0000} ({data.ProcessID}.{data.ThreadID}) {data.EventName} " +
                               $"{data.ParentProcessID} ({data.ParentThreadID})");
         noOfThreadStarted++;
     }
 }
        private void OnThreadEnd(ThreadTraceData data)
        {
            TraceThread thread = data.Thread();

            Debug.Assert(thread != null);
            if (null == thread)
            {
                return;
            }

            // Get the thread state.
            ComputingResourceThreadState threadState = m_ThreadState[(int)thread.ThreadIndex];

            // Mark the thread as dead.
            threadState.BlockTimeStartRelativeMSec = double.NegativeInfinity;
        }
        private void OnThreadStart(ThreadTraceData data)
        {
            TraceThread thread = data.Thread();

            Debug.Assert(thread != null);
            if (null == thread)
            {
                return;
            }

            // Get the thread state.
            ComputingResourceThreadState threadState = m_ThreadState[(int)thread.ThreadIndex];

            // Mark that blocking has started.
            threadState.LogBlockingStart(this, thread, data);
        }
Esempio n. 5
0
 private void OnThreadStop(ThreadTraceData obj)
 {
     ThreadTrace?.Invoke((ThreadTraceData)obj.Clone(), EventType.ThreadStop);
 }