Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/Tools/dotnet-gcdump/CommandLine/ConvertCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,20 @@ public static int ConvertFile(FileInfo input, string output, bool verbose)

if (!EventPipeDotNetHeapDumper.DumpFromEventPipeFile(input.FullName, memoryGraph, log, heapInfo))
{
Console.Error.WriteLine($"Failed to convert '{input.FullName}' to gcdump. The input file may not be a valid nettrace file, or it may not contain GC heap events. Try running with '-v' for more information.");
Comment thread
pavelsavara marked this conversation as resolved.
return -1;
}

try
{
memoryGraph.AllowReading();
}
catch (ApplicationException ex)
{
Console.Error.WriteLine($"Failed to convert '{input.FullName}': {ex.Message} The nettrace file may not contain a complete GC heap dump. Try running with '-v' for more information.");
Comment thread
pavelsavara marked this conversation as resolved.
return -1;
}

memoryGraph.AllowReading();
GCHeapDump.WriteMemoryGraph(memoryGraph, outputFileInfo.FullName, "dotnet-gcdump");

return 0;
Expand Down
Loading