RFR(S) 8233826 Change CDS dumping tty->print_cr() to unified logging
Ioi Lam
ioi.lam at oracle.com
Wed Dec 18 16:48:48 UTC 2019
On 12/17/19 11:01 PM, David Holmes wrote:
> Hi Ioi,
>
> On 18/12/2019 4:31 pm, Ioi Lam wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8233826
>> http://cr.openjdk.java.net/~iklam/jdk15/8233826-cds-change-tty-to-ul.v01/
>>
>>
>> During CDS dumping, a few messages are printed out unconditionally
>> using tty->print_cr(). This patch changes the message to use
>> log_info(cds) instead.
>
> Is there a specific reason you thought dumping needs to be a silent
> operation by default? I kind of liked the fact -Xshare:dump told me
> what it was doing.
>
Most tools in the JDK are silent by default. I suspect that most people
used the CDS dumping output as an indication that "something is
happening" and not actually look at its contents.
This patch affects only static archive dumping ("-Xshare:dump"). Dynamic
archive dumping (-XX:ArchiveClassAtExit) has never printed log messages
by default, and no one has complained. So I think that's good indication
that the -Xshare:dump messages can be turned off by default.
> There are a couple of cases listed in the bug report that are not in
> the webrev - are they not part of CDS dumping?
>
Those are controlled by the PrintSharedArchiveAndExit flag so they
should be printed to tty.
if (PrintSharedArchiveAndExit && _validating_shared_path_table) {
// If we are doing PrintSharedArchiveAndExit and some of the
classpath entries
// do not validate, we can still continue "limping" to validate the
remaining
// entries. No need to quit.
tty->print("[");
tty->vprint(msg, ap);
tty->print_cr("]");
} else {
> Mechanically the changes seem fine.
Thanks
- Ioi
>
> Thanks,
> David
> -----
>
>> Some test cases were expecting the messages in stdout. I modified
>> these tests to explicitly pass -Xlog:cds.
>>
>> Thanks
>> - Ioi
>>
More information about the hotspot-runtime-dev
mailing list