-XX:-PrintCompilation logging method

java, jvm

Solution

According to this study, which is one of the few reference on the subject:

Size

This is the size of the original bytecodes of the method. It's NOT the size of the generated native code. The CompileTask isn't even executed yet when PrintCompilation prints out the log; it couldn't have known the size of the generated code in advance.

It is printed before the compilation. That is why the size is the original one, not the optimized one.

Problem

When the JVM logs the compilation/decompilation of the class of my program, does it log just before starting the compilation/decompilation or just after it has finished to compile/decompile? I use `-XX:+PrintCompilation` for asking JVM to log. Thanks, Romain

Original source