Skip to content

Profiling: document memory leak diagnostics - #3450

Open
rolfbjarne wants to merge 4 commits into
dotnet:mainfrom
rolfbjarne:leak-profiling
Open

Profiling: document memory leak diagnostics#3450
rolfbjarne wants to merge 4 commits into
dotnet:mainfrom
rolfbjarne:leak-profiling

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Aug 5, 2026

Copy link
Copy Markdown
Member

Add Apple-first workflows for managed GC dumps and native Instruments analysis, including the .NET 11 CoreCLR transition and Native AOT limitations.


Internal previews

File Preview link
docs/fundamentals/profiling.md docs/fundamentals/profiling
docs/TOC.yml docs/TOC

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>
Copilot AI review requested due to automatic review settings August 5, 2026 12:39
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit cfd3dff:

✅ Validation status: passed

File Status Preview URL Details
docs/fundamentals/profiling.md ✅Succeeded View (>=net-maui-8.0)
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The 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 found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread docs/fundamentals/profiling.md Outdated
Comment thread docs/fundamentals/profiling.md
Comment thread docs/fundamentals/profiling.md
Comment thread docs/fundamentals/profiling.md Outdated
Comment thread docs/fundamentals/profiling.md
Comment thread docs/fundamentals/profiling.md Outdated
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>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The 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 found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 7488faa:

✅ Validation status: passed

File Status Preview URL Details
docs/fundamentals/profiling.md ✅Succeeded View (>=net-maui-8.0)
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

Comment thread docs/fundamentals/profiling.md Outdated
Comment thread docs/fundamentals/profiling.md Outdated
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-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 679bc90:

✅ Validation status: passed

File Status Preview URL Details
docs/fundamentals/profiling.md ✅Succeeded View (>=net-maui-8.0)
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit f902602:

✅ Validation status: passed

File Status Preview URL Details
docs/fundamentals/profiling.md ✅Succeeded View (>=net-maui-8.0)
docs/TOC.yml ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The 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 found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@rolfbjarne
rolfbjarne marked this pull request as ready for review August 6, 2026 17:25
@rolfbjarne
rolfbjarne requested a review from a team as a code owner August 6, 2026 17:25
@rolfbjarne

Copy link
Copy Markdown
Member Author

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

@jfversluis

Copy link
Copy Markdown
Member

@rolfbjarne does look like some linting errors etc.

@dalexsoto dalexsoto left a comment

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.

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.

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.

4 participants