JIT C2方法最大大小 [英] JIT C2 method maximum size
问题描述
我想知道是否有JIT C2可以编译的最大方法. 假设有一个方法可以将一个类映射到另一个类,但是该类包含许多字段.它变得很热,C1对其进行了优化,但是在某个时候C2会启动.如果字节码足够长,C2会忽略该方法而不编译吗? 我找不到任何答案.也许没有这样的事情?
JIT编译器有很多限制.
其中之一是HugeMethodLimit
等于8000,并且在产品JVM构建中不可调整.字节码超过8000个字节的方法将不会被C2或C1编译.可以使用-XX:-DontCompileHugeMethods
来关闭此限制.
There are a number of JIT compiler limits.
One of them is HugeMethodLimit
equal to 8000 and not tunable in product JVM builds. The methods with more than 8000 bytes of bytecode will not be compiled, neither by C2 nor by C1. This limit can be turned off with -XX:-DontCompileHugeMethods
.
C2 can also cease compilation of smaller methods, if the total number of IR nodes (not bytes of bytecode) reaches 80000. This limit can be tuned with -XX:MaxNodeLimit
(C2-specific option).
There many other thresholds (see 1, 2) that affect inlining and certain JIT optimizations.
这篇关于JIT C2方法最大大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!