Skip to content

Commit

Permalink
Added Core check with InProcess.
Browse files Browse the repository at this point in the history
Removed redundant check with CoreRt.
  • Loading branch information
timcassell committed Dec 14, 2020
1 parent c918e15 commit 116b4e0
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ private void AssertSurvived(IToolchain toolchain, Type benchmarkType, Dictionary
{
// Core has survived memory measurement problems.
// See https://github.com/dotnet/runtime/issues/45446
if (toolchain is CsProjCoreToolchain || toolchain is CoreRtToolchain) // CoreRt actually does measure accurately in a normal benchmark run, but doesn't with the specific version used in these tests.
if (toolchain is CsProjCoreToolchain
|| (toolchain.IsInProcess && RuntimeInformation.IsNetCore)
|| toolchain is CoreRtToolchain) // CoreRt actually does measure accurately in a normal benchmark run, but doesn't with the specific version used in these tests.
return;

var config = CreateConfig(toolchain, MemoryDiagnoser.WithSurvived);
Expand All @@ -410,11 +412,6 @@ private void AssertSurvived(IToolchain toolchain, Type benchmarkType, Dictionary

foreach (var benchmarkSurvivedValidator in benchmarkSurvivedValidators)
{
// CoreRT is missing some of the CoreCLR threading/task related perf improvements, so sizeof(Task<int>) calculated for CoreCLR < sizeof(Task<int>) on CoreRT
// see https://github.com/dotnet/corert/issues/5705 for more
if (benchmarkSurvivedValidator.Key == nameof(AccurateSurvived.AllocateTaskSurvive) && toolchain is CoreRtToolchain)
continue;

var survivedBenchmarks = benchmarks.BenchmarksCases.Where(benchmark => benchmark.Descriptor.WorkloadMethodDisplayInfo == benchmarkSurvivedValidator.Key).ToArray();

foreach (var benchmark in survivedBenchmarks)
Expand Down

0 comments on commit 116b4e0

Please sign in to comment.