3 ms·
Correct. To view the JIT-emitted code, you can either use a debugger or set a special environment variable (COMPlus_JitDisasm='NameOfMyMethod') that tells the J
by mandaleeka 9y ago
Correct. To view the JIT-emitted code, you can either use a debugger or set a special environment variable (COMPlus_JitDisasm='NameOfMyMethod') that tells the JIT to emit some logging about the code it generates for that method (it appears this is what the author of the blog post did).
- taspeotis 9y agoCOMPlus_JitDisasm lead me to this [1]. Thanks! [1] https://github.com/dotnet/coreclr/blob/master/Documentation/building/viewing-jit-dumps.md https://github.com/dotnet/coreclr/blob/master/Documentation/...
- matthewwarren 9y agoYeah that's how I did it, I guess I should include the 'COMPlus_JitDisasm' info in the post, when I get a chance I'll update it
- pjmlp 9y agoAnother easier way is just to run it under Visual Studio debugging session, put breakpoint on the code one wants to see and select "Show Disassembly" view.
- taspeotis 9y agoI'm aware of this method but I've found it difficult in practice, you want to be running in Release mode for the JIT optimisatinos. Then due to method inlining your breakpoint might get inlined somewhere that "just my code" thinks is not your code. You rarely want "just my code" off in practice, so it becomes cumbersome to toggle off/on.
- pjmlp 9y agoYeah I agree it isn't the best way, just one that I find comfortable to use since I am always on Studio. What about using Windbg with the sos.dll extensions?