I can monitor JRuby JIT(from ruby to java bytecode) can monitor by using
But I cannnot monitor java JIT with -J-XX:+PrintCompilation even using
other command like -J-XX:+LogCompilation.
Is there missing point in above procedure or I need to hack Java VM code
to monitor java JIT?
Currently I am using follows on Windows 7 on 64-bit
The -J-XX:+PrintCompilation flag should work fine to show the JVM
eventually compiling Java code (and jitted JRuby code) to native. It
will list the methods as they’re compiled (and as they’re thrown out,
if they need to re-optimize). Keep in mind that when running the
server VM, methods must be called 10k times to JIT to native. That
brings us to your next flag…
-J-XX:CompileThreshold=1 should force the JVM to compile things right
away, but I would recommend just running your code longer to get a
better idea of how it optimizes.
Your next flag doesn’t seem correct. If you’re trying to pass this to
JRuby, it would jube be -Xjit.logging=true. The threshold flag is
fine; JRuby does not optimize based on runtime profiles, so you can
feel free to force compilation with the threshold flag or by having
JRuby compile every file on load with -X+C.