Skip to content

Commit 0415e06

Browse files
authored
Fix the condemned reason table construction logic (microsoft#1226)
1 parent 3c80832 commit 0415e06

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/PerfView/GcStats.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -856,18 +856,15 @@ private static void PrintEventCondemnedReasonsTable(TextWriter writer, TraceProc
856856

857857
bool hasAnyContent = false;
858858
bool[] columnHasContent = new bool[CondemnedReasonsHtmlHeader.Length];
859-
foreach (byte[] condemnedReasonRow in condemnedReasonRows)
859+
for (int j = 0; j < CondemnedReasonsHtmlHeader.Length; j++)
860860
{
861-
for (int j = 0; j < CondemnedReasonsHtmlHeader.Length; j++)
861+
foreach (byte[] condemnedReasonRow in condemnedReasonRows)
862862
{
863-
if (columnHasContent[j])
864-
{
865-
break;
866-
}
867863
if (condemnedReasonRow[j] != 0)
868864
{
869865
hasAnyContent = true;
870866
columnHasContent[j] = true;
867+
break;
871868
}
872869
}
873870
}
@@ -1063,7 +1060,7 @@ private static void FillCondemnedReason(byte[] result, GCCondemnedReasons reason
10631060
{
10641061
for (CondemnedReasonGroup i = 0; i < CondemnedReasonGroup.Max; i++)
10651062
{
1066-
result[(int)i] = reasons.CondemnedReasonGroups[(int)i];
1063+
result[(int)i] |= reasons.CondemnedReasonGroups[(int)i];
10671064
}
10681065
}
10691066

0 commit comments

Comments
 (0)