Re:Adding a new Bytecode instruction to the .NET runtime
by mandaleeka on Friday May 19, 2017 @11:38PM
(#14380916)
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).
[ Parent
| on HN ]
Re:Adding a new Bytecode instruction to the .NET runtime
by taspeotis on Saturday May 20, 2017 @12:29AM
(#14381040)
COMPlus_JitDisasm lead me to this [1]. Thanks!
[1] https://github.com/dotnet/coreclr/blob/master/Documentation/...
Re:Adding a new Bytecode instruction to the .NET runtime
by matthewwarren on Saturday May 20, 2017 @04:05AM
(#14381481)
Yeah 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
Re:Adding a new Bytecode instruction to the .NET runtime
by pjmlp on Saturday May 20, 2017 @05:23AM
(#14381602)
Another 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.
Re:Adding a new Bytecode instruction to the .NET runtime
by taspeotis on Saturday May 20, 2017 @06:13AM
(#14381694)
I'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.