I installed fastdebug build of JDK 6, and ran this command:
java -XX:+PrintCFGToFile Test
but no file with printed information found... I tried it on both Linux and Windows operational systems, without any success. After giving up I built JDK from sources (OpenJDK 7 sources, Ubuntu), but no success, again the same, it prints "VM option '+PrintCFGToFile'"
but no file created in the directory with class executed, nor in JDK bin directory... I looked for "output.cfg" on the file system, nothing found... I checked sources, and it seems that file really has name "output.cfg" (if I'm not wrong it is CFGPrinter)
What's wrong? Should any additional option be specified? How and where to get this file with control flow graph information?
well, many thanks to OpenJDK mailing list, especially to Krystal Mok who unswered this question of mine, and not to leave this question unanswered here, and to share it with community:
There are two JITs in HotSpot:
1) C1 aka client JIT
2) C2 aka server JIT
since I used Ubuntu, HotSpot used C2 compilator, and PrintCFGToFile is applied to C1 only.
You might want to turn on -XX:+TieredCompilation if you really want to see this flag working, on you're current platform
was an advice, so the solution is:
java -XX:+PrintCFGToFile -XX:+TieredCompilation Test
running it I get output.cfg file in the folder with class executed (as expected)