Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public bool PrintHeap(IEnumerable<ClrObject> objects, DisplayKind displayKind, b
// Also, don't report fragmentation for Large/Pinned/Frozen segments. This check
// is a little slow, so we do this last.
ClrSegment seg = obj.Type.Heap.GetSegmentByAddress(obj);
if (seg is not null && seg.Kind is not GCSegmentKind.Large or GCSegmentKind.Pinned or GCSegmentKind.Frozen)
if (seg is not null && seg.Kind is not (GCSegmentKind.Large or GCSegmentKind.Pinned or GCSegmentKind.Frozen))
{
fragmentation ??= new();
fragmentation.Add((lastFreeObject, obj));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class FindEphemeralReferencesToLOHCommand : ClrRuntimeCommandBase

public override void Invoke()
{
int segments = Runtime.Heap.Segments.Count(seg => seg.Kind is not GCSegmentKind.Frozen or GCSegmentKind.Pinned);
int segments = Runtime.Heap.Segments.Count(seg => seg.Kind is not (GCSegmentKind.Frozen or GCSegmentKind.Pinned));
Comment thread
max-charlamb marked this conversation as resolved.
if (segments > 50)
{
string gcSegKind = Runtime.Heap.SubHeaps[0].HasRegions ? "regions" : "segments";
Expand Down Expand Up @@ -121,7 +121,7 @@ public override void Invoke()

// This handles both regions and segments
Generation gen = seg.GetGeneration(obj);
if (gen is not Generation.Generation0 or Generation.Generation1)
if (gen is not (Generation.Generation0 or Generation.Generation1))
{
continue;
}
Expand Down