Repository navigation
Docs (.NET 11): modernize MAUI profiling guidance - #3517
jfversluis merged 6 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 40da357: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
🔵 Needs a closer look
Several documented workflows need correction or clarification before approval.
Pull request overview
Updates .NET MAUI profiling documentation for .NET 11 while preserving earlier Mono guidance.
Changes:
- Adds CoreCLR/EventPipe and diagnostic-port workflows.
- Versions platform-specific profiling instructions.
- Updates performance documentation and platform coverage.
File summaries
| File | Summary |
|---|---|
docs/fundamentals/profiling.md |
Adds versioned .NET 10 and .NET 11 profiling guidance. |
docs/deployment/performance.md |
Updates platform coverage and links to profiling documentation. |
Review details
Suppressed comments (14)
docs/fundamentals/profiling.md:40
- This blanket statement conflicts with the runtime matrix in
docs/deployment/runtimes-compilation.md:112-120,158-168, which documents Mono as the default on iOS and Mac Catalyst, CoreCLR as experimental on iOS, and CoreCLR as the .NET 11 default only for Android Release and Windows. As written, the followingDiagnostic*and local-CoreCLR instructions are presented as the normal path for default Mono iOS/Mac Catalyst builds. Please scope these instructions to apps configured for CoreCLR (and document that configuration) or update the runtime overview and all affected examples together before publishing.
> .NET MAUI applications normally use CoreCLR on Android, iOS, Mac
> Catalyst, and Windows in .NET 11 and later. NativeAOT has different
> diagnostics limitations; see [NativeAOT deployment](~/deployment/nativeaot.md).
> For runtime selection, see [Runtime and compilation](~/deployment/runtimes-compilation.md).
docs/fundamentals/profiling.md:503
- This physical iOS runtime-profiling command also lacks the target device selection. Add
-p:RuntimeIdentifier=ios-arm64and-p:_DeviceName=<UDID>so the command actually launches the physical device described by the heading.
dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen
dotnet-trace collect --dsrouter ios --format speedscope
**docs/fundamentals/profiling.md:830**
* The physical iOS memory-dump command has the same target-selection problem: `-f net11.0-ios` does not identify a physical device. Include the `ios-arm64` RID and `_DeviceName` UDID before documenting this as a USB-device workflow.
dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen
dotnet-gcdump collect --dsrouter ios
Run the physical iOS workflow from a macOS development host.
docs/fundamentals/profiling.md:293
- This physical-device example does not actually select a physical iOS target:
net11.0-iosalone leaves the device/simulator selection implicit. The iOS CLI guidance requires-p:RuntimeIdentifier=ios-arm64and-p:_DeviceName=<UDID>for a device, so this command can deploy to the wrong target instead of the USB device described below.
Use the same `net11.0-ios` settings as the iOS simulator, but run
`dotnet-trace collect --dsrouter ios` from a macOS development host.
The `ios` router mode uses the USB-connected physical iOS device.
docs/fundamentals/profiling.md:434
- The startup workflow repeats the simulator settings for a physical device, so it still omits the
ios-arm64runtime identifier and the device UDID required to deploy to a USB-connected device. Replace this with an explicit physical-device build command; otherwise the documented startup trace may run against a simulator or fail to select the device.
Use the same `net11.0-ios` settings as the iOS simulator and
`dotnet-trace collect --dsrouter ios` from a macOS development host.
Keep the physical-device and simulator workflows separate.
docs/fundamentals/profiling.md:839
- The .NET 11 memory-dump block has no Windows collection workflow. This article now presents Windows as a local CoreCLR diagnostic target and tells readers to use
dotnet-gcdump, but this monikered section only provides Android, iOS, and Mac Catalyst commands. Add the equivalent Windowsdotnet-gcdump collect -p <pid>flow (or link to an existing one).
**Mac Catalyst:**
Use the direct local CoreCLR endpoint instead of `--dsrouter`:
```sh
dotnet-trace ps
dotnet-gcdump collect -p <pid>
**docs/fundamentals/profiling.md:221**
* `ios-sim` and `ios` have opposite TCP topologies: the simulator router accepts a runtime TCP client, while the physical-device router connects over usbmux to a runtime TCP server. Therefore the simulator must use `connect` and only a physical device should use `listen`; the current description makes the simulator workflow incorrect.
DiagnosticListenMode: Usesconnectfor Android, where the
app connects to the router. The .NET 11 iOS SDK useslisten,
where the app listens for the router. Keep the iOS simulator and
physical iOS device workflows separate.
**docs/fundamentals/profiling.md:286**
* This iOS simulator command sets `DiagnosticListenMode=listen`, but `dotnet-dsrouter ios-sim` accepts a runtime TCP client. The simulator app therefore needs `connect`; with `listen`, both sides wait for the other to connect and collection cannot start.
dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen
**docs/fundamentals/profiling.md:293**
* The physical-device workflow cannot use the simulator's settings: the simulator must use `connect`, whereas the `ios` router for a USB-connected device connects to an app listening on the diagnostic port. This text would carry the simulator's incorrect `listen`/topology into the physical-device instructions.
Use the same net11.0-ios settings as the iOS simulator, but run
dotnet-trace collect --dsrouter ios from a macOS development host.
The ios router mode uses the USB-connected physical iOS device.
**docs/fundamentals/profiling.md:427**
* This startup command repeats the iOS simulator topology with `DiagnosticListenMode=listen`. `dotnet-dsrouter ios-sim` expects the simulator runtime to connect to its TCP server, so this value must be `connect`; `listen` is for the physical-device `ios` router.
dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=true -p:DiagnosticListenMode=listen
**docs/fundamentals/profiling.md:434**
* The physical startup workflow cannot reuse the simulator's listen mode. The simulator must use `connect`, while the USB `ios` router connects to a physical device that listens on the diagnostic port; this instruction should state the physical-device `listen` setting explicitly.
Use the same net11.0-ios settings as the iOS simulator and
dotnet-trace collect --dsrouter ios from a macOS development host.
Keep the physical-device and simulator workflows separate.
**docs/fundamentals/profiling.md:494**
* This runtime-profiling command also sets `DiagnosticListenMode=listen` for the simulator. The `ios-sim` router is the TCP server and requires the app to use `connect`; otherwise this collector cannot attach.
dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen
**docs/fundamentals/profiling.md:819**
* The memory-dump simulator command has the same reversed topology: `ios-sim` expects the simulator runtime to connect to the router, so `DiagnosticListenMode` must be `connect`, not `listen`. The physical `ios` workflow can keep `listen`.
dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen
**docs/fundamentals/profiling.md:50**
* This paragraph is outside a moniker, but its routing claim is only true for the new CoreCLR workflow. The `<=net-maui-10.0` section below packages the Mono diagnostic component for Mac Catalyst, and the repository's NativeAOT guidance describes Mac Catalyst tracing through `dotnet-dsrouter`; a .NET 10 reader is therefore told to use the wrong endpoint. Make this sentence version-neutral or scope it by moniker.
To profile .NET MAUI applications with the .NET diagnostic tools, you
need to install the following .NET global tools. The router is used
for the Android and iOS TCP workflows; Mac Catalyst and Windows use
their local diagnostic endpoints.
- **Files reviewed:** 2/2 changed files
- **Comments generated:** 0
- **Review effort level:** Lite
</details>
---
💡 <a href="/dotnet/docs-maui/new/main?filename=.github/skills/code-review/SKILL.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add a `code-review` agent skill</a> or configure MCP servers for context-aware, tailored reviews. <a href="https://docs.github.com/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review?tool=webui#mcp-servers-and-agent-skills" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn more in the docs.</a>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Learn Build status updates of commit 1760c79: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Learn Build status updates of commit dfebe05: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
@jonathanpeppers could you please review this? (I can't assign reviewers still waiting on getting into the right team to get write access into the repo) |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit ab84dae: ✅ Validation status: passed
For more details, please refer to the build report. |
Summary
Relationship to other documentation work
This PR is based directly on
mainand contains no commits from #3511 or vitek-karas#2. It can be reviewed independently. However, #3511 should merge first so the runtime overview establishes the CoreCLR terminology before this profiling guidance is published.The experimental
maui profileCLI page and the general .NET diagnostic-port reference are tracked separately and are intentionally out of scope.Validation
UnknownContentTypewarning..NET 10and.NET 11moniker views were checked separately.maincontains onlydocs/fundamentals/profiling.mdanddocs/deployment/performance.md.Remaining pre-merge validation
Owner approval and end-to-end .NET 11 validation are still required for the custom TCP
listenworkflow on both an iOS simulator and a physical iOS device, including the exact address, port, launch order, suspend/later-attach behavior, readable trace output, anddotnet-gcdumpcollection.Internal previews
Build report