What Options a HotSpot JVM Supports?

Today, I've taken notice of two helpful HotSpot JVM options: -XX:+PrintFlagsInitial and -XX:+PrintFlagsFinal. The first one shows the initial HotSpot options and their values, before HotSpot applies its rules and optimizations; the second one shows them afterwards. Comparing these two might help you to understand, how the HotSpot JVM works. In either case it shows, how many tunables are supported by your HotSpot JVM, and gives some idea, how to push the optimizations of that JVM further. You get even more flags, when you add -XX:+UnlockDiagnosticVMOptions to -XX:+PrintFlagsFinal.
The downside is, that you don't get any documentation for these flags. But it's a good starting point for further investigation either by web search or by grep'ing through the JVM's source code - if it is available like for the OpenJDK.

No comments:

Post a Comment