|
1 | | -# .NET Framework 4.6 - Testing with RyuJIT |
| 1 | +.NET Framework 4.6 - Testing RyuJIT |
| 2 | +=================================== |
2 | 3 |
|
3 | | -The .NET Framework 4.6 includes new Just-In-Time (JIT) compiler for 64-bit processes, called RyuJIT. It is enabled by default. It is still a preview version, so you may discover issues that have yet to be fixed. |
| 4 | +The [.NET Framework 4.6](http://blogs.msdn.com/b/dotnet/archive/2015/07/20/announcing-net-framework-4-6.aspx#net-framework-46) includes new Just-In-Time (JIT) compiler for 64-bit processes, called RyuJIT. It is enabled by default. |
4 | 5 |
|
5 | | -You may experience the following symptoms when you use the new JIT compiler: |
| 6 | +This document provides instructions to disable RyuJIT or one of its optimizations, in order to test your program without it running. This is useful if you experience unexpected product behavior and want to determine if RyuJIT is the cause of that behavioral change. |
6 | 7 |
|
7 | | -* An application throws an `InvalidProgramException` error. |
8 | | -* An application works on an x86-based computer but not on an x64-based |
9 | | - computer. |
10 | | - |
11 | | -## Workarounds for JIT Compilation |
12 | | - |
13 | | -To work around this problem, use any one of the following methods. |
| 8 | +Disable RyuJIT |
| 9 | +============== |
14 | 10 |
|
15 | 11 | **Important** Follow the steps in this section carefully. Serious problems might |
16 | 12 | occur if you modify the registry incorrectly. Before you modify it, |
@@ -48,7 +44,8 @@ existing NGEN images that have been compiled by the new JIT continue to be used. |
48 | 44 | </runtime> |
49 | 45 | </configuration> |
50 | 46 |
|
51 | | -## Workarounds for NGEN Compilation |
| 47 | +Disable loading NGEN Images |
| 48 | +=========================== |
52 | 49 |
|
53 | 50 | If you encounter a bug when you use the new JIT, and if the bug manifests itself |
54 | 51 | as an NGEN image, use any of the following methods to force certain named |
@@ -88,4 +85,20 @@ assemblies to be recompiled by the JIT and not use the existing native images: |
88 | 85 | <assemblyIdentity name="assembly_two" /> |
89 | 86 | </disableNativeImageLoad> |
90 | 87 | </runtime> |
91 | | - </configuration> |
| 88 | + </configuration> |
| 89 | + |
| 90 | +Disable Tail Call Optimization |
| 91 | +============================== |
| 92 | + |
| 93 | +You can disable tail call optimization in RyuJIT with the following instructions. |
| 94 | + |
| 95 | +* In the registry, create either of the following subkeys: |
| 96 | + |
| 97 | + HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework |
| 98 | + HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework |
| 99 | + |
| 100 | + Then, specify the following: |
| 101 | + |
| 102 | + Key name: TailCallOpt |
| 103 | + Type: REG_SZ |
| 104 | + Value: "0" |
0 commit comments