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