Search code examples
javajvm-hotspot

Java Hotspot command line parameter to increase the maximum size of Java method


Is there a command line parameter to increase the maximum size of Java method (from 8000 bytecodes) that Hotspot will compile?


Solution

  • You might have to download the sources and build with debug flags for this (I'm not sure).

    java -XX:+UnlockDiagnosticVMOptions -XX:-DontCompileHugeMethods

    More information can be found here.

    If you download the sources I think most of the (hundreds) flags can be found.. hotspot/src/share/vm/runtime/arguments.cpp

    hotspot/src/share/vm/runtime/globals.cpp