RFR (S): 8216490: Spammy periodic GC log message contains random time stamp with periodic gc disabled

Thomas Schatzl thomas.schatzl at oracle.com
Fri Jan 11 14:14:36 UTC 2019


Hi all,

  can I have reviews for this small change that fixes somewhat spammy
log messages for the periodic garbage collections feature if it is
*disabled*?

So at the moment, if you somehow enable gc+periodic debug level log
messages (e.g. via gc*=debug), you will get a message that the current
periodic gc is being skipped because of the wrong reason basically,
also containing some random number due to an uninitialized variable.

This change fixes that by:

- at the start of the VM g1 will now print whether periodic gcs are
enabled or disabled (with the selected interval if enabled) once
- only if enabled, the periodic gc checking log messages are printed as
usual, and without the problem with the uninitialized variable.

CR:
https://bugs.openjdk.java.net/browse/JDK-8216490
Webrev:
http://cr.openjdk.java.net/~tschatzl/8216490/webrev/
Testing:
new test

Thanks,
  Thomas




More information about the hotspot-gc-dev mailing list