RFR(S): 8181644: C1 crashes with -XX:+PrintCFGToFile
vladimir.kozlov at oracle.com
Tue Jun 6 14:55:16 UTC 2017
May be use guarantee instead of assert in cfg_printer_output() to avoid parfait complains? Or add NULL check in all callers.
Otherwise looks good.
On 6/6/17 5:47 AM, Tobias Hartmann wrote:
> 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