Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5426da9
First set of instrumentation of asyncv1, completing all 24 scenarios.
lateralusX May 19, 2026
b5457c2
Instrument most async profiler events except callstacks.
lateralusX May 22, 2026
2a8368d
Implementing asyncv1 callstack support.
lateralusX May 28, 2026
b761045
Cleanup and instrumentation optimizations.
lateralusX Jun 1, 2026
c4ef92b
Fixing inline resume method append frame logic.
lateralusX Jun 2, 2026
279b4d1
Fixing double create emit on custom sync/scheduler scenarios.
lateralusX Jun 2, 2026
d9c5ed3
Added callstack merge capabilities to tests.
lateralusX Jun 2, 2026
739556b
Extend asyncv1 test suite.
lateralusX Jun 2, 2026
ee1f33f
Native AOT adjustments around method id and state.
lateralusX Jun 3, 2026
2976e50
Don't emit append event for last continuation when method events are …
lateralusX Jun 3, 2026
8dd1b72
Add single threaded asyncv1 smoke test.
lateralusX Jun 3, 2026
8b3fee2
Drop suspend event on asyncv1.
lateralusX Jun 4, 2026
ad0cbee
Major async profiler tests refactory, split into v1 and v2.
lateralusX Jun 4, 2026
248080b
Some more test cleanup.
lateralusX Jun 4, 2026
9780296
Add ValueTask tests to asyncv2.
lateralusX Jun 4, 2026
8d61bf3
Port some asyncv1 tests to asyncv2.
lateralusX Jun 5, 2026
77c0837
Adjustments.
lateralusX Jun 5, 2026
357cf37
Move TStateMachineDiagnosticData into own file + enable V1 on Mono.
lateralusX Jun 5, 2026
80811e3
Fix compile on Mono + added instrumentation checkpoint to diag data.
lateralusX Jun 5, 2026
6ede146
Wire reset context event for both v1 and v2.
lateralusX Jun 9, 2026
d60fdcc
Fix handling of generic test methods.
lateralusX Jun 9, 2026
a4cb95b
Review feedback.
lateralusX Jun 9, 2026
06ea01b
Include wrapper index in callstack events.
lateralusX Jun 9, 2026
39b50f2
Drop state for async v2 callstacks.
lateralusX Jun 9, 2026
e5a96e3
Enable debug output for some failing tests.
lateralusX Jun 9, 2026
60ed372
Fix some tests.
lateralusX Jun 10, 2026
feab698
Split asyncv2 and asyncv1 event ids.
lateralusX Jun 10, 2026
ba3d168
Adjust test and enable dump on failing test.
lateralusX Jun 10, 2026
e142efe
Add support for parent dispatcher and dispatcher id for v1/v2 create …
lateralusX Jun 10, 2026
93f4613
Streamline dispatcher id implementation.
lateralusX Jun 12, 2026
4ce8923
Add event manifest to support per event versioning.
lateralusX Jun 15, 2026
79bdf05
Enable logging on failing tests.
lateralusX Jun 15, 2026
dda0281
Fix Mono build.
lateralusX Jun 15, 2026
dfbd823
Disable NAOT and fix some more tests.
lateralusX Jun 16, 2026
98a4c0d
Add a couple of more tests + isolate v1/v2 test chains.
lateralusX Jun 16, 2026
54f5b3f
Use custom asserts to dump all captured events on failure.
lateralusX Jun 16, 2026
e603139
Fix stable event sort order + harden RuntimeAsync_WhenAll_TracksAllBr…
lateralusX Jun 17, 2026
161776e
Split V1 and V2 keywords + update naming.
lateralusX Jun 17, 2026
1de2c3a
Share current continuation in profiler TLS storage.
lateralusX Jun 22, 2026
d847d91
Added support for suspend context on v1.
lateralusX Jun 22, 2026
50015ae
Fix all keyword handling.
lateralusX Jun 22, 2026
0edf9d1
Add 3 new v1 tests scenarios, inline resume vs pooled resume.
lateralusX Jun 22, 2026
3253b9b
Fix callstack overflow size calculation and handling.
lateralusX Jun 23, 2026
329c1c3
Disable mixed v1/v2 tests on Native AOT.
lateralusX Jun 23, 2026
b527521
Harden callstack overflow test.
lateralusX Jun 23, 2026
bb2044b
Don't fire append callstack on callstack truncation.
lateralusX Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,8 @@ private unsafe void InstrumentedDispatchContinuations(AsyncInstrumentation.Flags
Continuation? nextContinuation = curContinuation.Next;
asyncDispatcherInfo.NextContinuation = nextContinuation;

RuntimeAsyncInstrumentationHelpers.SyncPointCheck(ref asyncDispatcherInfo, flags, curContinuation);

Debug.Assert(awaitState.CurrentThread != null);
if (curContinuation.TryGetExecutionContext(out ExecutionContext? execContext))
{
Expand Down Expand Up @@ -1173,7 +1175,7 @@ private static void InstrumentedFinalizeRuntimeAsyncTask<T>(RuntimeAsyncTask<T>
Continuation? nextContinuation = state.SentinelContinuation!.Next;
if (nextContinuation != null)
{
AsyncProfiler.CreateAsyncContext.Create((ulong)task.Id, nextContinuation);
AsyncProfiler.CreateAsyncContext.Create(task, nextContinuation);
}
}

Expand Down Expand Up @@ -1510,6 +1512,16 @@ public static bool InstrumentCheckPoint
get => AsyncInstrumentation.IsSupported && AsyncInstrumentation.ActiveFlags != AsyncInstrumentation.Flags.Disabled;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SyncPointCheck(ref AsyncDispatcherInfo info, AsyncInstrumentation.Flags flags, Continuation curContinuation)
{
if (AsyncInstrumentation.IsEnabled.AsyncProfiler(flags))
{
info.AsyncProfilerInfo.CurrentContinuation = curContinuation;
AsyncProfiler.SyncPoint.Check(ref info.AsyncProfilerInfo);
}
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResumeRuntimeAsyncContext(Task task, ref AsyncDispatcherInfo info, AsyncInstrumentation.Flags flags)
{
Expand Down Expand Up @@ -1571,7 +1583,7 @@ public static void CompleteRuntimeAsyncContext(ref AsyncDispatcherInfo info, Asy
{
if (AsyncInstrumentation.IsEnabled.AsyncProfiler(flags))
{
AsyncProfiler.CompleteAsyncContext.Complete(ref info.AsyncProfilerInfo);
AsyncProfiler.CompleteAsyncContext.Complete(ref info);
}

if (AsyncInstrumentation.IsEnabled.AsyncDebugger(flags))
Expand All @@ -1592,7 +1604,7 @@ public static void UnwindRuntimeAsyncMethodUnhandledException(ref AsyncDispatche
{
if (AsyncInstrumentation.IsEnabled.AsyncProfiler(flags))
{
AsyncProfiler.AsyncMethodException.Unhandled(ref info.AsyncProfilerInfo, unwindedFrames);
AsyncProfiler.AsyncMethodException.Unhandled(ref info, unwindedFrames);
}

if (AsyncInstrumentation.IsEnabled.AsyncDebugger(flags))
Expand All @@ -1613,7 +1625,7 @@ public static void UnwindRuntimeAsyncMethodHandledException(ref AsyncDispatcherI
{
if (AsyncInstrumentation.IsEnabled.AsyncProfiler(flags))
{
AsyncProfiler.AsyncMethodException.Handled(ref info.AsyncProfilerInfo, unwindedFrames);
AsyncProfiler.AsyncMethodException.Handled(ref info, unwindedFrames);
}

if (AsyncInstrumentation.IsEnabled.AsyncDebugger(flags))
Expand All @@ -1630,7 +1642,7 @@ public static void ResumeRuntimeAsyncMethod(ref AsyncDispatcherInfo info, AsyncI
{
if (AsyncInstrumentation.IsEnabled.AsyncProfiler(flags))
{
AsyncProfiler.ResumeAsyncMethod.Resume(ref info.AsyncProfilerInfo);
AsyncProfiler.ResumeAsyncMethod.Resume(ref info);
}

if (AsyncInstrumentation.IsEnabled.AsyncDebugger(flags))
Expand All @@ -1645,20 +1657,17 @@ public static void CompleteRuntimeAsyncMethod(ref AsyncDispatcherInfo info, Asyn
{
if (AsyncInstrumentation.IsEnabled.AsyncProfiler(flags))
{
if (AsyncInstrumentation.IsEnabled.CompleteAsyncMethod(flags))
{
AsyncProfiler.CompleteAsyncMethod.Complete(ref info);
}

AsyncProfiler.ContinuationWrapper.IncrementIndex(ref info.AsyncProfilerInfo);
}

if (AsyncInstrumentation.IsEnabled.CompleteAsyncMethod(flags))
if (AsyncInstrumentation.IsEnabled.AsyncDebugger(flags) && AsyncInstrumentation.IsEnabled.CompleteAsyncMethod(flags))
{
if (AsyncInstrumentation.IsEnabled.AsyncProfiler(flags))
{
AsyncProfiler.CompleteAsyncMethod.Complete(ref info.AsyncProfilerInfo);
}

if (AsyncInstrumentation.IsEnabled.AsyncDebugger(flags))
{
AsyncDebugger.CompleteAsyncMethod(curContinuation);
}
AsyncDebugger.CompleteAsyncMethod(curContinuation);
}
}

Expand Down
Loading
Loading