Profiling: document memory leak diagnostics - #3450
Conversation
Add Apple-first workflows for managed GC dumps and native Instruments analysis, including the .NET 11 CoreCLR transition and Native AOT limitations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Learn Build status updates of commit cfd3dff: ✅ 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 |
There was a problem hiding this comment.
Pull request overview
Adds a new performance profiling guide to the .NET MAUI docs (with an Apple-first focus on diagnosing memory growth), and wires it into the main docs navigation. The page expands managed GC dump guidance (dotnet-gcdump) and adds native-memory workflows via Xcode Instruments, with runtime notes for the .NET 10 (Mono) vs .NET 11 (CoreCLR) transition and Native AOT constraints.
Changes:
- Adds a new “Performance profiling” entry to the docs TOC.
- Updates/expands the profiling guide with .NET 10 vs .NET 11 runtime diagnostics notes (Mono component vs CoreCLR built-in).
- Adds a more detailed memory profiling + leak investigation workflow for iOS/Mac Catalyst, including Instruments guidance and Native AOT limitations.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/TOC.yml | Adds a nav entry pointing readers to the profiling guide. |
| docs/fundamentals/profiling.md | Expands profiling guidance (especially memory leak diagnostics) with monikered runtime notes and Apple Instruments workflows. |
Clarify runnable samples and device capture, document Apple attach entitlements, restore leak narrowing guidance, and generalize the Native AOT heap limitation. Co-authored-by: Copilot <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 7488faa: ✅ Validation status: passed
For more details, please refer to the build report. |
Explain event-publisher retention, extend desktop diagnostics to macOS, and format the Instruments entitlement requirement as a note. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Learn Build status updates of commit 679bc90: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Learn Build status updates of commit f902602: ✅ 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 |
|
CC @dalexsoto @jonathanpeppers @mattleibow Could you have a look at this? Apparently I can't assign reviewers :/ Rendered doc: https://review.learn.microsoft.com/en-us/dotnet/maui/fundamentals/profiling?view=net-maui-11.0&branch=pr-en-us-3450 |
|
@rolfbjarne does look like some linting errors etc. |
dalexsoto
left a comment
There was a problem hiding this comment.
The macOS/Mac Catalyst GC-dump commands document an incompatible diagnostic-port topology. DOTNET_DiagnosticPorts="$TMPDIR/maui-gcdump.socket,suspend" leaves the runtime in its default connect mode, while the shown bare dotnet-gcdump --diagnostic-port invocation does not establish a compatible listener and fails (--diagnostic-port is only supporting connect mode). Please replace this section with a verified connection topology, such as the default diagnostic socket with dotnet-gcdump ps and collect --process-id, or another end-to-end tested setup.
Add Apple-first workflows for managed GC dumps and native Instruments analysis, including the .NET 11 CoreCLR transition and Native AOT limitations.
Internal previews