From 79ac1f988821a152b570c66a33004ea5c7fcc64f Mon Sep 17 00:00:00 2001 From: Maoni0 Date: Sun, 18 Jul 2021 16:57:11 -0700 Subject: [PATCH] GC events changes --- .../Computers/TraceManagedProcess.cs | 28 +++++++++++++++---- src/TraceEvent/Parsers/ClrTraceEventParser.cs | 6 +++- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/TraceEvent/Computers/TraceManagedProcess.cs b/src/TraceEvent/Computers/TraceManagedProcess.cs index 7e9be86bd..bfc5f1636 100644 --- a/src/TraceEvent/Computers/TraceManagedProcess.cs +++ b/src/TraceEvent/Computers/TraceManagedProcess.cs @@ -2616,7 +2616,7 @@ internal static FreeListEfficiency GetFreeListEfficiency(List GCs, Trac return freeList; } - if (gc.PerHeapHistories[0].HasFreeListAllocated && gc.PerHeapHistories[0].HasFreeListRejected) + if (gc.PerHeapHistories[0].HasAllocatedInfo) { freeList.Allocated = 0; freeList.FreeListConsumed = 0; @@ -3526,15 +3526,27 @@ public MarkInfo(bool initPromoted = true) /// /// Per heap statistics /// + /// HasAllocatedInfo indicates the following fields will not be -1 + /// FreeListAllocated + /// FreeListRejected + /// EndOfSegAllocated + /// CondemnedAllocated + /// PinnedAllocated + /// PinnedAllocatedAdvance + /// RunningFreeListEfficiency public class GCPerHeapHistory { public int MemoryPressure; public bool HasMemoryPressure; public bool VersionRecognized; public long FreeListAllocated; - public bool HasFreeListAllocated; + public bool HasAllocatedInfo; public long FreeListRejected; - public bool HasFreeListRejected; + public long EndOfSegAllocated; + public long CondemnedAllocated; + public long PinnedAllocated; + public long PinnedAllocatedAdvance; + public int RunningFreeListEfficiency; public int CondemnReasons0; public int CondemnReasons1; public bool HasCondemnReasons1; @@ -4599,9 +4611,13 @@ internal static void ProcessPerHeapHistory(TraceLoadedDotNetRuntime proc, GCPerH var hist = new GCPerHeapHistory() { FreeListAllocated = (data.HasFreeListAllocated) ? data.FreeListAllocated : -1, - HasFreeListAllocated = data.HasFreeListAllocated, - FreeListRejected = (data.HasFreeListRejected) ? data.FreeListRejected : -1, - HasFreeListRejected = data.HasFreeListRejected, + HasAllocatedInfo = data.HasFreeListAllocated, + FreeListRejected = (data.HasFreeListAllocated) ? data.FreeListRejected : -1, + EndOfSegAllocated = (data.HasFreeListAllocated) ? data.EndOfSegAllocated : -1, + CondemnedAllocated = (data.HasFreeListAllocated) ? data.CondemnedAllocated : -1, + PinnedAllocated = (data.HasFreeListAllocated) ? data.PinnedAllocated: -1, + PinnedAllocatedAdvance = (data.HasFreeListAllocated) ? data.PinnedAllocatedAdvance : -1, + RunningFreeListEfficiency = (data.HasFreeListAllocated) ? data.RunningFreeListEfficiency : -1, MemoryPressure = (data.HasMemoryPressure) ? data.MemoryPressure : -1, HasMemoryPressure = data.HasMemoryPressure, VersionRecognized = data.VersionRecognized, diff --git a/src/TraceEvent/Parsers/ClrTraceEventParser.cs b/src/TraceEvent/Parsers/ClrTraceEventParser.cs index abac2b60e..19efd5040 100644 --- a/src/TraceEvent/Parsers/ClrTraceEventParser.cs +++ b/src/TraceEvent/Parsers/ClrTraceEventParser.cs @@ -4827,7 +4827,11 @@ public enum MarkRootType MarkOlder = 3, MarkSizedRef = 4, MarkOverflow = 5, - MarkMax = 6, + MarkDependentHandles = 6, + MarkNewFQ = 7, + MarkSteal = 8, + MarkBGCRoots = 9, + MarkMax = 10, } public sealed class GCMarkTraceData : TraceEvent