Skip to content

[browser] EP profiler - identify top frame, positive PID #115825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2025

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented May 21, 2025

@pavelsavara pavelsavara added this to the 10.0.0 milestone May 21, 2025
@pavelsavara pavelsavara self-assigned this May 21, 2025
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Diagnostics-mono os-browser Browser variant of arch-wasm labels May 21, 2025
@pavelsavara pavelsavara marked this pull request as ready for review May 22, 2025 16:32
@Copilot Copilot AI review requested due to automatic review settings May 22, 2025 16:32
Copy link
Contributor

@Copilot 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

This PR addresses several profiler and event tracing issues by ensuring proper PID values and refining profiler call handling for improved stability and API consistency.

  • Update WASM sample project instrumentation configuration
  • Ensure interpreter frames correctly set the instruction pointer prior to profiler callbacks
  • Update event tracing calls and diagnostics promises to resolve profiler-related issues

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj Updated instrumentation configuration for WebAssembly profiling
src/mono/mono/mini/interp/interp.c Modified profiler call blocks to set the instruction pointer correctly
src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c Adjusted event writing to pass the correct thread context and updated context initialization
src/mono/browser/runtime/startup.ts Updated PID calculation to produce a positive 31-bit integer
src/mono/browser/runtime/diagnostics/diagnostics-js.ts Added resolution of onClosePromise after diagnostic client closure

@pavelsavara
Copy link
Member Author

/backport to release/10.0-preview5

Copy link
Contributor

Started backporting to release/10.0-preview5: https://github.com/dotnet/runtime/actions/runs/15192146608

@pavelsavara pavelsavara enabled auto-merge (squash) May 22, 2025 16:49
@pavelsavara pavelsavara changed the title [browser] EP profiler - identify top frame [browser] EP profiler - identify top frame, positive PID May 22, 2025
@pavelsavara pavelsavara merged commit c68838e into dotnet:main May 22, 2025
67 of 70 checks passed
@pavelsavara pavelsavara deleted the ep_perf branch May 22, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Diagnostics-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPU sample data collected using collectCpuSamples() from Blazor WebAssembly app doesn't load in Visual Studio
2 participants