禁用特定方法/类的Java JIT? [英] Disable Java JIT for a specific method/class?
本文介绍了禁用特定方法/类的Java JIT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Java应用程序中遇到问题,JIT破坏了代码。如果我禁用JIT,一切正常,但运行速度慢10-20倍。
I'm having an issue in my Java application where the JIT breaks the code. If I disable the JIT, everything works fine, but runs 10-20x slower.
有没有办法禁用特定方法或类的JIT?
Is there any way to disable the JIT for a specific method or class?
编辑:
我正在使用Ubuntu 10.10,获得相同的结果:
I'm using Ubuntu 10.10, getting the same results both with:
OpenJDK Runtime Environment (IcedTea6 1.9) (6b20-1.9-0ubuntu1)
OpenJDK 64-Bit Server VM (build 17.0-b16, mixed mode)
和:
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
推荐答案
以下选项适用于我的JVM,以排除特定方法:
The following option works on my JVMs, to exclude a specific method:
-X:CompileCommand=exclude,the/package/and/Class,methodName
这篇关于禁用特定方法/类的Java JIT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文