Disable Java JIT for a specific method/class?

前端 未结 2 1265
误落风尘
误落风尘 2020-12-10 15:40

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.

Is there any way to d

相关标签:
2条回答
  • 2020-12-10 15:58

    Yes, there is one. You can supply the affected classes you want to exclude JIT compilation at start-up:

    -Xjit:exclude={package/class.method|package/class.method}
    
    0 讨论(0)
  • 2020-12-10 16:03

    The following option works on my JVMs, to exclude a specific method:

    -X:CompileCommand=exclude,the/package/and/Class,methodName
    
    0 讨论(0)
提交回复
热议问题