JIT C2 method maximum size

前端 未结 1 1116
半阙折子戏
半阙折子戏 2021-01-24 14:37

I was wondering if there is a method maximum size for JIT C2 to compile it. Let\'s assume there is a method which just maps one class to another, but this class contains a lot

相关标签:
1条回答
  • 2021-01-24 14:44

    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.

    0 讨论(0)
提交回复
热议问题