How to find native instructions generated from class file

妖精的绣舞 提交于 2020-01-06 14:35:34

问题


I would like to learn what native instructions Java's JIT compiler generates when it loads a class file. Is there any way of knowing it?

I am working in Linux on a 586 processor. And I am using Sun's JDK 1.6 update 21. Is there any tool that I can use to find out what I am looking for?


回答1:


You probably need -XX:+PrintOptoAssembly, but you'd need a debug build of the JVM. The links to the binary distributions seem not to be available any longer, so you might have to build it from source: http://download.java.net/jdk6/6u10/archive/

If you're planning to try this with OpenJDK 7 as well, this might be of interest: http://wikis.sun.com/display/HotSpotInternals/PrintAssembly



来源:https://stackoverflow.com/questions/3578992/how-to-find-native-instructions-generated-from-class-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!