Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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).


COMPlus_JitDisasm lead me to this [1]. Thanks!

[1] https://github.com/dotnet/coreclr/blob/master/Documentation/...


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


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.


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.


Yeah 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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: