怎么看JVM中的JIT编译code? [英] How to see JIT-compiled code in JVM?

查看:466
本文介绍了怎么看JVM中的JIT编译code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些办法看到本地code产生由在JVM中的JIT?

Is there some way to see the native code produces by the JIT in a JVM?

推荐答案

假设你正在使用Sun JVM热点。添加标记

Assuming you're using the Sun Hotspot JVM. Add the flag

-XX:+ PrintOptoAssembly

-XX:+PrintOptoAssembly

要不管你正在运行。这将只打印为已JIT'd code中的组件(即你不会看到非JIT'd东西组装),但我认为这是你想要的。如果你想看到的一切想什么,如果它被JIT'd你可以通过调整可能在JIT阈值:

To whatever you're running. This will only print the assembly for code that has been JIT'd (i.e. you don't get to see assembly for non JIT'd stuff) but I think that's what you want. If you want to see what everything would like if it were JIT'd you could probably tweak the JIT threshold via:

-XX:CompileThreshold =#

-XX:CompileThreshold=#

这篇关于怎么看JVM中的JIT编译code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆