Skip to content

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

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

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

if (wrapperName is null)
continue;
if (wrapperName.StartsWith(WrapperNamePrefix, StringComparison.Ordinal))
return int.Parse(wrapperName.Substring(WrapperNamePrefix.Length));
public IReadOnlyList<ParsedEvent> All => _events;

/// <summary>All distinct event IDs present in the stream.</summary>
public IEnumerable<AsyncEventID> EventIds => _events.Select(e => e.EventId);
Comment on lines +116 to +120
// [wrapperNameTemplateLength byte]
// [wrapperNameTemplate UTF8 bytes]
byte[] templateBytes = System.Text.Encoding.UTF8.GetBytes(ContinuationWrapper.NameTemplate);
const int MaxStaticEventPayloadSize = Serializer.MaxCompressedUInt64Size + Serializer.MaxCompressedUInt64Size + Serializer.MaxCompressedUInt64Size + Serializer.MaxCompressedUInt32Size + 1 + 1;
int maxDynamicEventPayloadSize = templateBytes.Length;
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.

2 participants