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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为特定方法/类禁用 Java JIT?
基础教程推荐
- 存储 20 位数字的数据类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
