diff --git a/src/benchmarks/gc/src/exec/GCPerfSim/GCPerfSim.cs b/src/benchmarks/gc/src/exec/GCPerfSim/GCPerfSim.cs index 61c1c7bbb2a..e43b5d10ab2 100644 --- a/src/benchmarks/gc/src/exec/GCPerfSim/GCPerfSim.cs +++ b/src/benchmarks/gc/src/exec/GCPerfSim/GCPerfSim.cs @@ -412,7 +412,7 @@ private Item(uint size, bool isPinned, bool isWeakLong, bool isPoh) if (isPoh) { -#if NET5_0 +#if NET5_0_OR_GREATER #if STATISTICS statistics.pohAllocatedBytes += remainingSize; #endif @@ -517,7 +517,7 @@ public SimpleRefPayLoad(uint size, bool isPinned, bool isPoh) uint remainingSize = size - SimpleRefPayLoadSize; if (isPoh) { -#if NET5_0 +#if NET5_0_OR_GREATER #if STATISTICS statistics.pohAllocatedBytes += remainingSize; #endif @@ -759,7 +759,7 @@ public override string ToString() { string result = $"{sizeRange}; surv every {survInterval}; pin every {pinInterval}; weight {weight}"; -#if NET5_0 +#if NET5_0_OR_GREATER result += $"; isPoh {isPoh}"; #endif @@ -1368,7 +1368,7 @@ private static Args ParseFromFile(string fileName) private const uint DEFAULT_POH_ALLOC_LOW = 100; private const uint DEFAULT_POH_ALLOC_HIGH = 200 * 1024; -#if NET5_0 +#if NET5_0_OR_GREATER private const uint DEFAULT_POH_PINNING_INTERVAL = 0; private const uint DEFAULT_POH_FINALIZABLE_INTERVAL = 0; private const uint DEFAULT_POH_SURV_INTERVAL = 0; @@ -1400,7 +1400,7 @@ private static Args ParseFromCommandLine(string[] args) uint pohAllocLow = DEFAULT_POH_ALLOC_LOW; uint pohAllocHigh = DEFAULT_POH_ALLOC_HIGH; -#if NET5_0 +#if NET5_0_OR_GREATER uint pohFinalizableInterval = DEFAULT_POH_FINALIZABLE_INTERVAL; uint pohSurvInterval = DEFAULT_POH_SURV_INTERVAL; #endif @@ -1420,6 +1420,7 @@ private static Args ParseFromCommandLine(string[] args) finishWithFullCollect = true; break; case "-endException": + case "-ee": endException = true; break; case "-testKind": @@ -1436,7 +1437,7 @@ private static Args ParseFromCommandLine(string[] args) break; case "-pohAllocRatio": case "-pohar": -#if NET5_0 +#if NET5_0_OR_GREATER pohAllocRatioArg = ParseUInt32(args[++i]); #else Console.WriteLine("The flag {0} is only supported on .NET Core 5+. Skipping in this run.", @@ -1466,7 +1467,7 @@ private static Args ParseFromCommandLine(string[] args) break; case "-pohSizeRange": case "-pohsr": -#if NET5_0 +#if NET5_0_OR_GREATER ParseRange(args[++i], out pohAllocLow, out pohAllocHigh); #else Console.WriteLine("The flag {0} is only supported on .NET Core 5+. Skipping in this run.", @@ -1483,7 +1484,7 @@ private static Args ParseFromCommandLine(string[] args) break; case "-pohSurvInterval": case "-pohsi": -#if NET5_0 +#if NET5_0_OR_GREATER pohSurvInterval = ParseUInt32(args[++i]); #else Console.WriteLine("The flag {0} is only supported on .NET Core 5+. Skipping in this run.", @@ -1509,7 +1510,7 @@ private static Args ParseFromCommandLine(string[] args) case "-pohFinalizableInterval": case "-pohfi": -#if NET5_0 +#if NET5_0_OR_GREATER pohFinalizableInterval = ParseUInt32(args[++i]); #else Console.WriteLine("The flag {0} is only supported on .NET Core 5+. Skipping in this run.", @@ -1533,7 +1534,7 @@ private static Args ParseFromCommandLine(string[] args) } if (totalLiveBytes == 0 && (sohSurvInterval != 0 || lohSurvInterval != 0 -#if NET5_0 +#if NET5_0_OR_GREATER || pohSurvInterval != 0 #endif )) @@ -1593,7 +1594,7 @@ private static Args ParseFromCommandLine(string[] args) bucketList.Add(lohBucket); } -#if NET5_0 +#if NET5_0_OR_GREATER if (pohWeight > 0) { BucketSpec pohBucket = new BucketSpec(