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

GC events changes #1462

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
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
28 changes: 22 additions & 6 deletions src/TraceEvent/Computers/TraceManagedProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,7 @@ internal static FreeListEfficiency GetFreeListEfficiency(List<TraceGC> GCs, Trac
return freeList;
}

if (gc.PerHeapHistories[0].HasFreeListAllocated && gc.PerHeapHistories[0].HasFreeListRejected)
if (gc.PerHeapHistories[0].HasAllocatedInfo)
{
freeList.Allocated = 0;
freeList.FreeListConsumed = 0;
Expand Down Expand Up @@ -3526,15 +3526,27 @@ public MarkInfo(bool initPromoted = true)
/// <summary>
/// Per heap statistics
/// </summary>
/// 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;
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion src/TraceEvent/Parsers/ClrTraceEventParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down