Skip to content

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

Open
lateralusX wants to merge 14 commits into
dotnet:mainfrom
lateralusX:lateralusX/async-profiler-test-adjustments
Open

Make Async Profiler tests compatible with single threaded runtime.#127762
lateralusX wants to merge 14 commits into
dotnet: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.

Copilot AI review requested due to automatic review settings May 12, 2026 09:29
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 3 comments.

@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).

@lateralusX
Copy link
Copy Markdown
Member Author

lateralusX commented May 12, 2026

@MichalStrehovsky, I fixed up the async profiler tests in this PR and ran all on the NAOT outertloop pipeline, looking at the failure, they seem to be unrelated. Anything else that needs to be run from a NAOT perspective or all good?

@MichalStrehovsky
Copy link
Copy Markdown
Member

@MichalStrehovsky, I fixed up the async profiler tests in this PR and ran all on the NAOT outertloop pipeline, looking at the failure, they seem to be unrelated. Anything else that needs to be run from a NAOT perspective or all good?

If these pass in runtime-nativeaot-outerloop, then LGTM! Thank you!

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 13, 2026 06:48
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.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 13, 2026 07:11
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 1 comment.

@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).

int maxDynamicEventPayloadSize = wrapperIPs.Length * Serializer.MaxCompressedUInt64Size;
// [wrapperNameTemplateLength (compressed uint32)]
// [wrapperNameTemplate UTF8 bytes]
ReadOnlySpan<byte> templateBytes = ContinuationWrapper.NameTemplateUtf8;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you expect the names of the wrappers to change? Can the names of wrappers be part of the async profiler contract instead of sending a constant string in each metadata payload? It is common for diagnostic tools to have hardcoded managed type and method names.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Probably not, but added it to have the flexibility since it felt bad to enforce the assumption as part of the contract, the metadata event is only emitted once per profiler session, so cheap.

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.

5 participants