Skip to content

Commit 9f44563

Browse files
committed
Take feedback, add section on COMPLUS_JitMinOpts
1 parent e9d2838 commit 9f44563

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

docs/testing-with-ryujit.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ To prevent any NGEN native image from being used, and force all code to be compi
105105

106106
**Note** This setting applies to both the 32-bit and 64-bit JIT. Thus, setting this globally will affect all 32-bit .NET applications as well. This is particularly true for **Method 2: environment variable**.
107107

108-
**Note 2** NGEN provides significant performance improvements to .NET applications. Disabling the use of NGEN will cause the perfomance of .NET applications to be significantly worse.
108+
**Note 2** NGEN provides significant performance improvements to .NET applications. Disabling the use of NGEN may result in significantly slower application startup times.
109109

110110
* **Method 1: per-application config file**. Add the following text to the `<app>.exe.config` file. Create
111111
the indicated sections if they do not already exist.
@@ -177,7 +177,20 @@ In this case, the annotated `add` function will not be optimized. You can see mo
177177

178178
This is only effective in solving a code generation problem if the incorrect code being generated by the JIT is due to optimization, as opposed to being due to unoptimized code generation.
179179

180-
Note that this method applies to all .NET JIT compilers.
180+
**Note** This method applies to all .NET JIT compilers.
181+
182+
Disabling optimization of all functions
183+
=======================================
184+
185+
While troubleshooting, it might be useful to determine if *any* JIT optimization is causing problems. Instead of using the above `MethodImplAttribute` method above, you can set a single environment variable to disable all JIT optimization. Set this variable:
186+
187+
COMPLUS_JitMinOpts=1
188+
189+
and run your application.
190+
191+
Note that when you run your application under the Visual Studio debugger, it disables JIT optimization by default, to improve the debugging experience. You can read about that [here](https://msdn.microsoft.com/en-us/library/ms241594.aspx).
192+
193+
**Note** This method applies to all .NET JIT compilers.
181194

182195
Additional Notes
183196
================

0 commit comments

Comments
 (0)