0

I'm trying to debug Java deoptimization, but I can't get -XX:+TraceDeoptimization to work. Do you know if it was disabled in OpenJDK 7, or maybe is not enabled in my version (7u9-2.3.4-0ubuntu1.12.04.1), or if there is some magic -XX:+unlockSomething that I need to call?

No matter what I try, I always get the error message

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

without any further details when I add this parameter. Even a plain java -XX:+TraceDeoptimization prints this message. It doesn't say it does not recognize the option, either. However, as PrintCompilation reveals, I'm seeing a "made not entrant" messages, which apparently indicate a deoptimization, and I'd like to debug why this is happening, as I'm seeing an odd performance drop with supposedly improved code.

Solution:

The default builds indeed do not include this functionality. You need a debug build. You can find some with Google on jdk7.java.net.

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194

3 Answers3

0

All flag options require a + or - to enable or disable them. In your case the option would be -XX:+TraceDeoptimization To turn it off (which is the default) you can write -XX:-TraceDeoptimization

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
0

The default builds indeed do not include this functionality.

You need a debug build. You can find some with Google on jdk7.java.net.

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
-1

This option is available only in the debug version of the VM. (at least that is what my idk 1.8u92 is telling me.

user2179737
  • 493
  • 3
  • 6