I am wondering how I can get the JIT'd llvm IR during VMKit execution. I am stuck in precompiling phase (when loading library classes), and I am facing various problems. If I can log the JIT'd llvm IR (from Java bytecode), that would be convenient.
I turned on --enable-debug, but it doesn't seem very helpful at this stage. Any other suggestion is welcome. Thanks very much.
If you want to see the generated llvm ir, you have to add a
"func->dump()" in the function JavaLLVMCompiler::parseFunction in the
file "lib/j3/Compiler/JavaLLVMCompiler.cpp" after the line 75. And if
you want to see which java bytecodes are executed (resp compiled), you
have to set the flags DEBUG and JNJVM_EXECUTE (resp JNJVM_COMPILE) to
1 in the file lib/j3/Compiler/JavaJIT.cpp. I think that you also have
to define DEBUG in JavaJITOpcode.cpp, but I don't remember if these
ones still work.
I hope that it helps,