diff --git a/src/PerfView/GcStats.cs b/src/PerfView/GcStats.cs index 9b1c6fa72..81760e22e 100644 --- a/src/PerfView/GcStats.cs +++ b/src/PerfView/GcStats.cs @@ -917,9 +917,15 @@ private static void PrintEventCondemnedReasonsTable(TextWriter writer, TraceProc continue; } } - events.Add(_event); int heapIndexHighestGen; - condemnedReasonRows.Add(GetCondemnedReasonRow(_event, out heapIndexHighestGen)); + byte[] condemnedReasonRow = GetCondemnedReasonRow(_event, out heapIndexHighestGen); + if (condemnedReasonRow == null) + { + // No per-heap or global condemned reasons information available for this event. + continue; + } + events.Add(_event); + condemnedReasonRows.Add(condemnedReasonRow); if (isServerGC) { heapIndexes.Add(heapIndexHighestGen); diff --git a/src/TraceEvent/Computers/TraceManagedProcess.cs b/src/TraceEvent/Computers/TraceManagedProcess.cs index 49f591d1a..d85cadd8c 100644 --- a/src/TraceEvent/Computers/TraceManagedProcess.cs +++ b/src/TraceEvent/Computers/TraceManagedProcess.cs @@ -4773,7 +4773,10 @@ internal void AddConcurrentPauseTime(TraceGC _event, double RestartEEMSec) } else { - Debug.Assert(_event.PauseDurationMSec == 0); + // For a BackgroundGC the initial pause is pre-seeded with SuspendDurationMSec + // at GCStart time (see the BGC branch in the GCStart handler), so PauseDurationMSec + // may already be non-zero when we get here. Overwrite it with the full pause + // (SuspendEE start -> RestartEE end), which is the authoritative value. _event.PauseDurationMSec = RestartEEMSec - _event.PauseStartRelativeMSec; } }