[docs] .NET 8 simplified dotnet-trace instructions#8436
Merged
jonathanpeppers merged 1 commit intodotnet:mainfrom Oct 18, 2023
Merged
[docs] .NET 8 simplified dotnet-trace instructions#8436jonathanpeppers merged 1 commit intodotnet:mainfrom
dotnet-trace instructions#8436jonathanpeppers merged 1 commit intodotnet:mainfrom
Conversation
Context: dotnet/diagnostics#4081 Context: dotnet/diagnostics#4090 Context: dotnet/runtime#88634 Context: dotnet/diagnostics#4337 Using the latest `dotnet-trace` tooling: > dotnet tool list -g Package Id Version Commands -------------------------------------------------------------------------------------- dotnet-dsrouter 7.0.447801 dotnet-dsrouter dotnet-gcdump 7.0.447801 dotnet-gcdump dotnet-trace 7.0.447801 dotnet-trace There is a simplified way to profile Android apps. For an Android emulator: > dotnet-dsrouter android-emu Start an application on android emulator with one of the following environment variables set: DOTNET_DiagnosticPorts=10.0.2.2:9000,nosuspend,connect DOTNET_DiagnosticPorts=10.0.2.2:9000,suspend,connect > adb shell setprop debug.mono.profile '10.0.2.2:9000,suspend,connect' > dotnet-trace ps 3248 dotnet-dsrouter > dotnet-trace collect -p 3248 ... [00:00:00:09] Recording trace 3.2522 (MB) Press <Enter> or <Ctrl+C> to exit... For an Android device you will eventually be able to do `dotnet-dsrouter android`, except we found one issue. Until dotnet/diagnostics#4337 is resolved, we can instead do: > adb reverse tcp:9000 tcp:9001 > dotnet-dsrouter server-server -tcps 127.0.0.1:9001 > adb shell setprop debug.mono.profile '127.0.0.1:9000,suspend,connect' > dotnet-trace ps > dotnet-trace collect -p 3248 We can also now use `dotnet-gcdump`! Instead of `dotnet-trace collect -p`, you can simply do: > dotnet-gcdump collect -p 3248 In both cases these tools *know* that the process ID is a `dotnet-dsrouter` process and to do the right thing.
grendello
approved these changes
Oct 17, 2023
lateralusX
approved these changes
Oct 18, 2023
grendello
added a commit
to grendello/xamarin-android
that referenced
this pull request
Oct 19, 2023
* main: Bump to xamarin/monodroid@47bdaaa9 (dotnet#8433) [docs] .NET 8 simplified `dotnet-trace` instructions (dotnet#8436)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context: dotnet/diagnostics#4081
Context: dotnet/diagnostics#4090
Context: dotnet/runtime#88634
Context: dotnet/diagnostics#4337
Using the latest
dotnet-tracetooling:There is a simplified way to profile Android apps.
For an Android emulator:
For an Android device you will eventually be able to do
dotnet-dsrouter android, except we found one issue.Until dotnet/diagnostics#4337 is resolved, we can instead do:
We can also now use
dotnet-gcdump! Instead ofdotnet-trace collect -p, you can simply do:In both cases these tools know that the process ID is a
dotnet-dsrouterprocess and to do the right thing.