How does the JVM decided to JIT-compile a method (categorize a method as “hot”)?
问题 I already worked with -XX:+PrintCompilation , and I know the basic techniques of the JIT-compiler and why JIT-compilation is used. Yet I still have not found out how the JVM decides to JIT-compile a method, i.e. "when the right time has come to JIT-compile a method". Am I right in the assumption that every method starts being interpreted, and as long as it is not categorized as "hot method" it will not be compiled? I have something in the back of my head that I read that a method is