[10] RFR(S): 8181644: C1 crashes with -XX:+PrintCFGToFile

Tobias Hartmann tobias.hartmann at oracle.com
Tue Jun 6 12:47:17 UTC 2017


please review the following patch:

C1 crashes in CFGPrinterOutput::print_LIR() when PrintCFGToFile is enabled. The problem is that a single CFGPrinterOutput object is shared between multiple C1 compiler threads leading to inconsistent values of CFGPrinterOutput::_do_print_LIR. One thread sets _do_print_LIR to 'true' while another thread expects it to be 'false' because the LIR is not available in the current phase. We crash while trying to dereference BlockBegin::_lir which is NULL.

I changed the implementation to create a CFGPrinterOutput object per C1 compilation (I had to move the declaration of CFGPrinterOutput from the cpp to the hpp file). Instead of a single "output.cfg" file, now one file per compiler thread is generated ("output_tid[TID]_pid[PID].cfg").

Tested manually with -Xcomp and -XX:+PrintCFGToFile.


More information about the hotspot-compiler-dev mailing list