Skip to content

Commit 2548395

Browse files
committed
Fixed IsTieredJitEnabled check in netcoreapp2.x.
1 parent f6a4194 commit 2548395

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BenchmarkDotNet/Portability/RuntimeInformation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private static bool IsAotMethod()
9191
// Disabled by default in netcoreapp2.X, check if it's enabled.
9292
? Environment.GetEnvironmentVariable("COMPlus_TieredCompilation") == "1"
9393
|| Environment.GetEnvironmentVariable("DOTNET_TieredCompilation") == "1"
94-
|| (AppContext.TryGetSwitch("System.Runtime.TieredCompilation", out bool isEnabled) && isEnabled)
94+
|| (AppContext.TryGetSwitch("System.Runtime.TieredCompilation", out bool isEnabled) && !isEnabled)
9595
// Enabled by default in netcoreapp3.0+, check if it's disabled.
9696
: Environment.GetEnvironmentVariable("COMPlus_TieredCompilation") != "0"
9797
&& Environment.GetEnvironmentVariable("DOTNET_TieredCompilation") != "0"

0 commit comments

Comments
 (0)