From bd10440dfe1717539413da65801facc838adfdfa Mon Sep 17 00:00:00 2001 From: Ramez Ragaa <66218781+ramezgerges@users.noreply.github.com> Date: Thu, 28 Nov 2024 23:56:19 +0200 Subject: [PATCH] docs: add instructions for gcdumps --- doc/articles/guides/profiling-applications.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/articles/guides/profiling-applications.md b/doc/articles/guides/profiling-applications.md index ad1c39d02ef7..6b0e8f750fce 100644 --- a/doc/articles/guides/profiling-applications.md +++ b/doc/articles/guides/profiling-applications.md @@ -14,6 +14,7 @@ Run the following commands - `dotnet tool update -g dotnet-dsrouter` - `dotnet tool update -g dotnet-trace` +- `dotnet tool update -g dotnet-gcdump` ## Profiling .NET iOS applications @@ -164,7 +165,11 @@ The `suspend` directive means that the application will wait for `dotnet-trace` - Open a browser at `https://speedscope.app` and drop the `*.speedscope.json` file in it -See complete [documentation](https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/tracing.md) for more details. +### Getting GC memory dumps + +To take a GC memory dump of a running android app, follow the same steps above, but instead of `dotnet-trace collect -p `, use `dotnet-gcdump collect -p `. It will create a `.gcdump` file that can be viewed in Visual Studio and Perfview on Windows and [heapview](https://github.com/1hub/dotnet-heapview) on non-Windows platforms. + +See complete [documentation](https://github.com/dotnet/android/blob/main/Documentation/guides/tracing.md) for more details. ### Analyzing the trace data