Is there any way to see the native code generated by CLR?
In java there is a option "-XX:+PrintOptoAssembly" to see the native code compiled by JIT. So is there any similar thing for CLR?
Is there any way to see the native code generated by CLR?
In java there is a option "-XX:+PrintOptoAssembly" to see the native code compiled by JIT. So is there any similar thing for CLR?
Yes, you could use WinDbg+SOS to dissassemble the JIT's generated code. More specifically, you may find that the!u
command especially useful for your needs:
Displays an annotated disassembly of a managed method specified either by a MethodDesc structure pointer for the method or by a code address within the method body. The U command displays the entire method from start to finish, with annotations that convert metadata tokens to names.