Skip to content
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

Cap node processing at 10mil and log issue #3628

Merged
merged 5 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Revert unnecessary changes
  • Loading branch information
hoyosjs committed Feb 1, 2023
commit 9b2ca563c50c3bd485b624faa46df6c3681393dc
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ public static bool DumpFromEventPipe(CancellationToken ct, int processID, Memory

eventPipeDataPresent = true;

if (gcNum < 0 && data.Depth == 2 && data.Type != GCType.BackgroundGC && data.Reason == GCReason.Induced)
if (gcNum < 0 && data.Depth == 2 && data.Type != GCType.BackgroundGC)
{
gcNum = data.Count;
memoryGraph.Is64Bit = data.PointerSize == 8;
log.WriteLine("{0,5:n1}s: .NET Dump Started...", getElapsed().TotalSeconds);
}
};
Expand Down
10 changes: 5 additions & 5 deletions src/Tools/dotnet-gcdump/DotNetHeapDump/MemoryGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public MemoryGraph(int expectedSize, bool isVeryLargeGraph = false)
m_addressToNodeIndex = new SegmentedDictionary<Address, NodeIndex>(expectedSize);
}
else
{
m_addressToNodeIndex = new Dictionary<Address, NodeIndex>(expectedSize);
{
m_addressToNodeIndex = new Dictionary<Address, NodeIndex>(expectedSize);
}

m_nodeAddresses = new SegmentedList<Address>(SegmentSize, expectedSize);
}

Expand Down Expand Up @@ -133,13 +133,13 @@ void IFastSerializable.ToStream(Serializer serializer)
// Write out the Memory addresses of each object
if (m_isVeryLargeGraph)
{
serializer.Write(m_nodeAddresses.Count);
serializer.Write(m_nodeAddresses.Count);
}
else
{
serializer.Write((int)m_nodeAddresses.Count);
}

for (int i = 0; i < m_nodeAddresses.Count; i++)
{
serializer.Write((long)m_nodeAddresses[i]);
Expand Down