Skip to content

Make Async Profiler tests compatible with single threaded runtime.#127762

Open
lateralusX wants to merge 10 commits intodotnet:mainfrom
lateralusX:lateralusX/async-profiler-test-adjustments
Open

Make Async Profiler tests compatible with single threaded runtime.#127762
lateralusX wants to merge 10 commits intodotnet:mainfrom
lateralusX:lateralusX/async-profiler-test-adjustments

Conversation

@lateralusX
Copy link
Copy Markdown
Member

@lateralusX lateralusX commented May 4, 2026

Initial async profiler tests used some techniques to isolate tests running on thread pool, but that doesn't work on single threaded platforms like WASM.

  • Split tests into tests that can run without multithreaded support and tests that must have thread pool.
  • Harden test to only look for specific events using a Task id mapping to the marker frame used by the test.
  • Fix failures on Native AOT due to missing native IP -> Method Name.

With these changes we now have all tests running on CoreCLR, NativeAOT and 38 out of 48 tests running on CoreCLR WASM single threaded configuration.

Copilot AI review requested due to automatic review settings May 4, 2026 15:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @VSadov
See info in area-owners.md if you want to be subscribed.

@lateralusX lateralusX force-pushed the lateralusX/async-profiler-test-adjustments branch from b3a77ba to fe86a97 Compare May 5, 2026 16:47
@lateralusX
Copy link
Copy Markdown
Member Author

/azp run runtime-nativeaot-outerloop

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings May 6, 2026 14:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

Comment on lines +1292 to +1294
var matchingResume = resumeStacks.FirstOrDefault(r => r.TaskId == create.TaskId);
if (matchingResume is null)
continue;
Comment on lines +1325 to +1327
var matchingResume = resumeStacks.FirstOrDefault(r => r.TaskId == create.TaskId);
if (matchingResume is null)
continue;
Assert.NotEmpty(frameCounts);
Assert.All(frameCounts, count => Assert.Equal(4u, count));
// Verify unwind frame count for this task
// UnhandledUnwindMarker -> DeepUnhandledOuter -> ChainedAsyncYield -> InnerAsyncYield, 4 frames deep after the initial resume.
{
var current = bufferInfos[i];
var next = bufferInfos[i + 1];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants