2 instantiations of AsyncThreadContext
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncProfiler.cs (2)
795context = new AsyncThreadContext(); 892AsyncThreadContext context = new AsyncThreadContext();
122 references to AsyncThreadContext
System.Private.CoreLib (122)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncProfiler.CoreCLR.cs (30)
43AsyncThreadContext context = AsyncThreadContext.Acquire(ref info); 65AsyncThreadContext.Release(context); 73AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 77AsyncThreadContext.Release(context); 80public static void Resume(ref AsyncDispatcherInfo info, AsyncThreadContext context, ulong dispatcherId, EventKeywords activeEventKeywords) 116AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 136AsyncThreadContext.Release(context); 144AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 153AsyncThreadContext.Release(context); 161AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 178AsyncThreadContext.Release(context); 183AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 190AsyncThreadContext.Release(context); 198AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 205AsyncThreadContext.Release(context); 213AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 220AsyncThreadContext.Release(context); 513private static unsafe void ResumeAsyncCallstacks(AsyncThreadContext context) 526private static unsafe void ResumeAsyncCallstacks(AsyncDispatcherInfo* runtimeAsyncInfo, AsyncStateMachineDispatcherInfo* stateMachineAsyncInfo, AsyncThreadContext context) 566public static void EmitCreateEvent(AsyncThreadContext context, long currentTimestamp, ulong parentDispatcherId, ulong dispatcherId, Continuation? asyncCallstack) 573public static void EmitSuspendEvent(AsyncThreadContext context, long currentTimestamp, ulong dispatcherId, Continuation? asyncCallstack) 580public static void EmitResumeEvent(AsyncThreadContext context, long currentTimestamp, ulong dispatcherId, byte continuationIndex, Continuation? asyncCallstack)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncProfiler.cs (92)
182public static bool Changed(AsyncThreadContext context) => context.ConfigRevision != Revision; 223public static void EmitAsyncProfilerMetadataIfNeeded(AsyncThreadContext context) 303AsyncThreadContext transientContext = AsyncThreadContext.AcquireTransient(); 329AsyncThreadContext.Release(transientContext); 489public static void Header(AsyncThreadContext context, ref EventBuffer eventBuffer) 530public static bool AsyncEventHeader(AsyncThreadContext context, ref EventBuffer eventBuffer, AsyncEventID eventID, EventManifestEntry.PayloadLengthFieldSize payloadLengthFieldSize, int maxPayloadLength, out int payloadLengthFieldOffset) 537public static bool AsyncEventHeader(AsyncThreadContext context, ref EventBuffer eventBuffer, AsyncEventID eventID) 543public static bool AsyncEventHeader(AsyncThreadContext context, ref EventBuffer eventBuffer, long currentTimestamp, AsyncEventID eventID, EventManifestEntry.PayloadLengthFieldSize payloadLengthFieldSize, int maxPayloadLength, out int payloadLengthFieldOffset) 549public static bool AsyncEventHeader(AsyncThreadContext context, ref EventBuffer eventBuffer, long currentTimestamp, AsyncEventID eventID) 555public static bool AsyncEventHeader(AsyncThreadContext context, ref EventBuffer eventBuffer, long currentTimestamp, long delta, AsyncEventID eventID, EventManifestEntry.PayloadLengthFieldSize payloadLengthFieldSize, int maxPayloadLength, out int payloadLengthFieldOffset, out AsyncEventHeaderRollbackData rollbackData) 610public static bool AsyncEventHeader(AsyncThreadContext context, ref EventBuffer eventBuffer, long currentTimestamp, long delta, AsyncEventID eventID, EventManifestEntry.PayloadLengthFieldSize payloadLengthFieldSize, int maxPayloadLength, out int payloadLengthFieldOffset) 673public static void RollbackAsyncEventHeader(AsyncThreadContext context, in AsyncEventHeaderRollbackData rollbackData) 726public static AsyncThreadContext Acquire(ref Info info) 728AsyncThreadContext context = Get(ref info); 741public static void Acquire(AsyncThreadContext context) 753public static void Release(AsyncThreadContext context) 760public static AsyncThreadContext Get() 762AsyncThreadContext? context = t_asyncThreadContext; 772public static AsyncThreadContext Get(ref Info info) 774Debug.Assert(info.Context == null || info.Context is AsyncThreadContext); 776AsyncThreadContext? context = Unsafe.As<AsyncThreadContext?>(info.Context); 785public static AsyncThreadContext AcquireTransient() 787AsyncThreadContext? context; 872private static void WaitOnBlockedAsyncThreadContext(AsyncThreadContext context) 882private static AsyncThreadContext GetAsyncThreadContext(ref Info info) 884AsyncThreadContext context = Get(); 890private static AsyncThreadContext CreateAsyncThreadContext() 892AsyncThreadContext context = new AsyncThreadContext(); 899private static AsyncThreadContext? t_asyncThreadContext; 923AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 945AsyncThreadContext.Release(context); 951AsyncThreadContext context = AsyncThreadContext.Acquire(ref info); 963AsyncThreadContext.Release(context); 968AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 978AsyncThreadContext.Release(context); 981public static void EmitEvent(AsyncThreadContext context, long currentTimestamp, ulong parentDispatcherId, ulong dispatcherId, AsyncEventID eventID) 1004AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 1008AsyncThreadContext.Release(context); 1011public static void Resume(ref AsyncStateMachineDispatcherInfo info, AsyncThreadContext context, ulong dispatcherId, EventKeywords activeEventKeywords) 1033public static void Append(ref AsyncStateMachineDispatcherInfo info, AsyncThreadContext context, long currentTimestamp) 1041public static void Append(ref AsyncStateMachineDispatcherInfo info, IAsyncStateMachineBox enteringBox, AsyncThreadContext context, long currentTimestamp) 1052public static void EmitEvent(AsyncThreadContext context, long currentTimestamp, ulong dispatcherId, AsyncEventID eventID) 1074AsyncThreadContext context = AsyncThreadContext.Acquire(ref info); 1083AsyncThreadContext.Release(context); 1086public static void EmitEvent(AsyncThreadContext context, long currentTimestamp, AsyncEventID eventID) 1097AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 1116AsyncThreadContext.Release(context); 1119public static void EmitEvent(AsyncThreadContext context, long currentTimestamp, AsyncEventID eventID) 1130AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 1137AsyncThreadContext.Release(context); 1140public static void EmitEvent(AsyncThreadContext context, long currentTimestamp, uint unwindedFrames, AsyncEventID eventID) 1160AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 1177AsyncThreadContext.Release(context); 1180public static void EmitEvent(AsyncThreadContext context, AsyncEventID eventID) 1186public static void EmitEvent(AsyncThreadContext context, long currentTimestamp, AsyncEventID eventID) 1197AsyncThreadContext context = AsyncThreadContext.Acquire(ref info.AsyncProfilerInfo); 1204AsyncThreadContext.Release(context); 1207public static void EmitEvent(AsyncThreadContext context, AsyncEventID eventID) 1253AsyncThreadContext context = AsyncThreadContext.Acquire(ref info); 1260AsyncThreadContext.Release(context); 1263private static void EmitEvent(AsyncThreadContext context) 1274AsyncThreadContext context = AsyncThreadContext.Get(); 1284AsyncThreadContext context = AsyncThreadContext.Get(ref info); 1292public static bool Check(AsyncThreadContext context) 1303private static void CheckSlow(AsyncThreadContext context) 1305AsyncThreadContext.Acquire(context); 1307AsyncThreadContext.Release(context); 1310private static void ResetContext(AsyncThreadContext context) 1352private static void EmitEvent(AsyncThreadContext context) 1385public static void Add(AsyncThreadContext context) 1482AsyncThreadContext context = contextHolder.Context; 1510AsyncThreadContext context = contextHolder.Context; 1553public AsyncThreadContextHolder(AsyncThreadContext context, Thread ownerThread) 1559public readonly AsyncThreadContext Context; 1605public static void EmitEvent(ref AsyncStateMachineDispatcherInfo info, AsyncThreadContext context, long currentTimestamp, ulong dispatcherId) 1623public static void EmitEvent(ref AsyncStateMachineDispatcherInfo info, AsyncThreadContext context, object? continuation, long currentTimestamp, AsyncEventID eventID, ulong dispatcherId) 1767private static void EmitAsyncCallstack<T>(AsyncThreadContext context, long currentTimestamp, long delta, AsyncEventID eventID, ulong parentDispatcherId, ulong dispatcherId, ref T captureCallstack) 1773private static void EmitAsyncCallstack<T>(AsyncThreadContext context, long currentTimestamp, long delta, AsyncEventID eventID, ulong parentDispatcherId, ulong dispatcherId, byte continuationIndex, ref T captureCallstack)