For proper statistics use Visual VM or Flight Recorder, if using an OpenJDK derived JVM implementation.
Also note that not all JVMs are made alike, and there are plenty to chose from.
Also note that not all JVMs are made alike, and there are plenty to chose from.