本文介绍了如何查找从类文件生成的本机指令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解Java的JIT编译器在加载类文件时生成的本机指令.有什么办法知道吗?

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?

我正在Linux上的586处理器上工作.而且我正在使用Sun的JDK 1.6更新21.是否可以使用任何工具来查找所需的内容?

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?

推荐答案

您可能需要-XX:+PrintOptoAssembly,但是您需要调试JVM.二进制发行版的链接似乎不再可用,因此您可能必须从源代码构建它: http://download.java.net/jdk6/6u10/archive/

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/

如果您还打算同时使用OpenJDK 7进行尝试,则可能会感兴趣: http://wikis.sun.com/display/HotSpotInternals/PrintAssembly

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

这篇关于如何查找从类文件生成的本机指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 08:26