Beispiel #1
0
        public IOCompletionTraceHook StartTracingCompletion()
        {
            var hook = new IOCompletionTraceHook(this);
            IOCompletionTraceHook existing = Interlocked.CompareExchange(ref m_traceHook, hook, comparand: null);

            Contract.Assume(existing == null, "Trace hook instance already installed");
            return(hook);
        }
Beispiel #2
0
        private unsafe void TraceStartIfEnabled(TaggedOverlapped *overlapped, IIOCompletionTarget target)
        {
            IOCompletionTraceHook traceHook = Volatile.Read(ref m_traceHook);

            if (traceHook != null)
            {
                traceHook.TraceStart(overlapped->GetUniqueId(), target);
            }
        }
Beispiel #3
0
        private unsafe void TraceCompletionIfEnabled(TaggedOverlapped *overlapped)
        {
            IOCompletionTraceHook traceHook = Volatile.Read(ref m_traceHook);

            traceHook?.TraceComplete(overlapped->GetUniqueId());
        }