How can I see the native code generated by the CLR?

Is there a way to see the native code generated by the CLR?

In java, there is the option " -XX: + PrintOptoAssembly " to see the native code compiled by JIT. So, is there something similar for the CLR?

+4
source share
1 answer

Yes, you can use WinDbg + SOS to parse the code generated by JIT. More specifically, you may find that the !u command is especially useful for your needs:

Displays an annotated disassembly of the managed method, indicated either by the pointer to the MethodDesc structure for the method, or by the code address inside the method body. The U command displays the entire method from start to finish, with annotations that convert metadata tokens into names.

+3
source

All Articles