I am sure that you can enable logging, which will show when the JITCed methods. But I don't know anything from Java to say.
And keep in mind that JIT compilation is not an event, but a process. The method can be recompiled several times, since information about its characteristics becomes available.
Finally, note that “warming up” generally takes place. Although you can usually “warm up” one method reliably, it is much more difficult even with very modest use due to a number of factors.
(Although I don’t know for any reason why the ability to read some JITC status for a method cannot be added to the built-in debugging tools.)
Added:. Beware when snippets are used when testing code that the most external method that executes the entire loop often does not support JITC (depending on how JITC is implemented) because it never returns, and, therefore, the JITCed version can never be called. Therefore, you should always put the "meat" of the code in a comparative analysis in a separate method, which is called multiple times, instead of putting the loop and code to be tested with the same method.
source share