RFR(S): 8209598: Use log_error for error message in CDS code (original) (raw)

Ioi Lam ioi.lam at oracle.com
Wed Oct 24 03:50:04 UTC 2018


On 10/23/18 7:27 PM, Calvin Cheung wrote:

On 10/23/18, 5:18 PM, Ioi Lam wrote: Hi Calvin,

if (PrintSharedArchiveAndExit) { if (PrintSharedDictionary) { -      tty->printcr("\nShared classes:\n"); +      loginfo(cds)("\nShared classes:\n"); SystemDictionary::printshared(tty); } if (archiveloadingfailed) { -      tty->printcr("archive is invalid"); +      logerror(cds)("archive is invalid"); vmexit(1); } else { -      tty->printcr("archive is valid"); +      loginfo(cds)("archive is valid"); vmexit(0); } } I think this part should use printcr, because the option says "Print ...". It shouldn't be necessary to explicitly set -Xlog:cds in order to get the printed message. Should I just revert loginfo changes and leave the logerror there?

I think the log_error should be reverted as well, because it would look out of place with the rest of the output.

Thanks



More information about the hotspot-runtime-dev mailing list