Skip to content

Allow for enabling VeryLargeObjects setting #1524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Jobs/EnvironmentMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public EnvironmentMode(string id, Jit jit, Platform platform) : this(id)
public EnvironmentMode(string id) : base(id) => GcCharacteristic[this] = new GcMode();

/// <summary>
/// Platform (x86 or x64)
/// Platform (x86, x64, ARM, ARM64, Wasm)
/// </summary>
public Platform Platform
{
Expand Down
5 changes: 5 additions & 0 deletions src/BenchmarkDotNet/Templates/CsProj.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
<Compile Include="$CODEFILENAME$" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!-- don't generate App.config file for Full .NET Framework, BenchmarkDotNet does it on it's own -->
<None Include="App.config" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$CSPROJPATH$" />
</ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions src/BenchmarkDotNet/Toolchains/CsProj/CsProjCoreToolchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ public override bool IsSupported(BenchmarkCase benchmarkCase, ILogger logger, IR
logger.WriteLineError($"Currently project.json does not support CpuGroups (app.config does), benchmark '{benchmarkCase.DisplayInfo}' will not be executed");
return false;
}
if (benchmarkCase.Job.ResolveValue(GcMode.AllowVeryLargeObjectsCharacteristic, resolver))
{
logger.WriteLineError($"Currently project.json does not support gcAllowVeryLargeObjects (app.config does), benchmark '{benchmarkCase.DisplayInfo}' will not be executed");
return false;
}

var benchmarkAssembly = benchmarkCase.Descriptor.Type.Assembly;
if (benchmarkAssembly.IsLinqPad())
Expand Down
4 changes: 0 additions & 4 deletions tests/BenchmarkDotNet.IntegrationTests/GcModeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
#if CLASSIC
using BenchmarkDotNet.Environments;
#endif

namespace BenchmarkDotNet.IntegrationTests
{
Expand Down Expand Up @@ -59,7 +57,6 @@ public void CanAvoidForcingGarbageCollections()
CanExecute<AvoidForcingGarbageCollection>(config);
}

#if CLASSIC // not supported by project.json so far
[Fact]
public void CanAllowToCreateVeryLargeObjectsFor64Bit()
{
Expand All @@ -78,7 +75,6 @@ public void CanAllowToCreateVeryLargeObjectsFor64Bit()

CanExecute<CreateVeryLargeObjects>(config);
}
#endif
}

public class ServerModeEnabled
Expand Down