16

I've installed the new Jit compiler for .NET RyuJit, and setup the AltJit=* key in .NetFramework in regedit as described in the installation docs. http://blogs.msdn.com/b/dotnet/archive/2013/09/30/ryujit-the-next-generation-jit-compiler.aspx

So how do I verify that RyuJit is actually beeing used?

Roger Johansson
  • 22,764
  • 18
  • 97
  • 193

2 Answers2

13

Setup a do-nothing project with Project + Properties:

  • Build tab, untick the Prefer 32-bit checkbox
  • Debug tab, tick the Enable native code debugging

Debug + Step Into. The Output window shows DLLs getting loaded. This line is what you are looking for:

'ConsoleApplication1.exe': Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\protojit.dll', Cannot find or open the PDB file.

Also visible from the Debug + Windows + Modules debugger window. protojit.dll is the name of the new jitter. Accurate for the CTP2 version, I can't guess if it will still be "proto" once it starts shipping.


Update: now shipping in .NET 4.6. It substitutes the original jitter using the clrjit.dll filename. The legacy version is still around and can be used when the new jitter causes trouble, its name is compatjit.dll. More details in this post.

Community
  • 1
  • 1
Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • ah ok, thanks, I see that it does use the protojit.dll – Roger Johansson Mar 15 '14 at 12:40
  • 1
    I see it loads both protojit.dll and clrjit.dll. Note that you don't need to check "Prefer 32-bit", you can just change the project target to x64. – phuclv Jun 21 '14 at 12:41
  • 1
    You must **untick** it. Always prefer AnyCPU as the target so the program can still limp along on a 32-bit operating system. – Hans Passant Jun 21 '14 at 12:43
  • yes but in the case of testing for RyuJIT then I don't think it's necessary too target anycpu – phuclv Jun 22 '14 at 04:54
  • Also make sure you add an app.manifest which says you target the right windows versions if you want to use SIMD – Ben Adams Jul 28 '14 at 08:28
  • @LưuVĩnhPhúc Please do not get into the habit of writing 64-bit only programs (and/or causing others to do so) unless you have a legitimate and necessary purpose. It's just as easy (infact easier) to just uncheck the box and then everyone can run your program. – BrainSlugs83 Sep 02 '14 at 01:18
  • I've done a few tests, and I see that clrjit.dll is *always* loaded, even in 32bits. So it doesn't seem to mean anything. – Thomas Levesque Aug 08 '15 at 19:34
6

tasklist /M protojit.dll from the command-line also works:

http://blogs.msdn.com/b/clrcodegeneration/archive/2014/04/03/ryujit-ctp3-how-to-use-simd.aspx

m0sa
  • 10,712
  • 4
  • 44
  • 91
TheBuildGuy
  • 83
  • 1
  • 5