-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't convert a nettrace file #6
Comments
Can you share the .nettrace file? Most likely the correct events were not recorded. It can be analyzed with PerfView to see the details, but it's not the most user friendly tool. |
Sure, here you go: I had follow the guide that I found here: https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/tracing.md However my app is a MAUI App, I am trying to found the issue that's causing a lot of GC on Android version of the app.. |
I have a couple more of netrace files, all of them giving error with mono-gcdump, here you go in case they're helpful |
Thanks, I will check the provided .nettrace files later today when I get home.
That guide should work as long as you specify |
I checked the .nettrace file and, unfortunately, it's missing some of the GC events (GCHeapDumpStart, GCHeapDumpStop, GCHeapDumpObjectReferenceData, GCRoots, etc.). Hence the It does have few others (GCEvent, GCRootRegister, GCRootUnregister). This usually means that the mask for dotnet-trace didn't use the correct parameters, or that it didn't capture a garbage collection. It is quite tricky to get that done correctly which is why I recommend using |
FWIW... if using I also updated the tool to work in the |
I'm having the same issue. |
@tranb3r If you can share the .nettrace file privately (filipnavara AT gmail) I can have a look. |
The trace file is recorded with .NET 8. For .NET 8 you should get the latest version of |
I think I'm having the same error. Here's my nettrace and the commands I used: dotnet-dsrouter
dotnet-tracePS C:\Repos\UnoApplicationTemplate\src\app\ApplicationTemplate.Mobile> dotnet-trace collect --diagnostic-port /tmp/uno-app3 -o uno-app-trace3 --providers Microsoft-DotNETRuntimeMonoProfiler:0xC900001:4
Provider Name Keywords Level Enabled By
Microsoft-DotNETRuntimeMonoProfiler 0x000000000C900001 Informational(4) --providers
Waiting for connection on tmp/uno-app3
Start an application with the following environment variable: DOTNET_DiagnosticPorts=tmp/uno-app3
Process : uno-app3
Output File : C:\Repos\UnoApplicationTemplate\src\app\ApplicationTemplate.Mobile\uno-app-trace3
[00:00:00:51] Recording trace 1.1737 (MB)
Press <Enter> or <Ctrl+C> to exit...
Stopping the trace. This may take several minutes depending on the application being traced.
Trace completed. dotnet buildPS C:\Repos\UnoApplicationTemplate\src\app\ApplicationTemplate.Mobile> dotnet build -f net7.0-android -t:run -c Release /p:RunAOTCompilation=true /p:AndroidEnableProfiler=true mono-gcdumpPS C:\Repos\UnoApplicationTemplate\src\app\ApplicationTemplate.Mobile> dotnet run --project ..\..\..\..\mono-gcdump\mono-gcdump.csproj -- convert uno-app-trace3.nettrace
C:\Repos\mono-gcdump\MonoGCRootRangeTracker.cs(63,31): warning CS8632: The annotation for nullable reference types should on
ly be used in code within a '#nullable' annotations context. [C:\Repos\mono-gcdump\mono-gcdump.csproj]
C:\Repos\mono-gcdump\MonoGCRootRangeTracker.cs(15,47): warning CS8632: The annotation for nullable reference types should on
ly be used in code within a '#nullable' annotations context. [C:\Repos\mono-gcdump\mono-gcdump.csproj]
C:\Repos\mono-gcdump\MonoGCRootRangeTracker.cs(15,67): warning CS8632: The annotation for nullable reference types should on
ly be used in code within a '#nullable' annotations context. [C:\Repos\mono-gcdump\mono-gcdump.csproj]
C:\Repos\mono-gcdump\Microsoft.Diagnostics.NETCore.Client\DiagnosticsClient\DiagnosticsClient.cs(480,17): warning CS8073: Th
e result of the expression is always 'false' since a value of type 'Guid' is never equal to 'null' of type 'Guid?' [C:\Repos
\mono-gcdump\mono-gcdump.csproj]
C:\Repos\mono-gcdump\Microsoft.Diagnostics.NETCore.Client\DiagnosticsClient\DiagnosticsClient.cs(527,17): warning CS8073: Th
e result of the expression is always 'false' since a value of type 'Guid' is never equal to 'null' of type 'Guid?' [C:\Repos
\mono-gcdump\mono-gcdump.csproj]
Unhandled exception: System.TimeoutException: Heap dump didn't start within 5 seconds
at MonoGCDump.MonoMemoryGraphBuilder.Build(EventPipeEventSource source, MonoGCRootRangeTracker rootRangeTracker, Action stop) in C:\Repos\mono-gcdump\MonoMemoryGraphBuilder.cs:line 98
at MonoGCDump.Program.HandleConvert(String inputFileName, String outputFileName) in C:\Repos\mono-gcdump\Program.cs:line 48
at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.SyncUsingAsync(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.Invoke(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()``` Oh and here's the project I'm trying to profile, if that helps. |
I got the following crash..
The text was updated successfully, but these errors were encountered: