RFR: 8152962: CMSCollector::shouldConcurrentCollect incorrectly logs against the debug stream

Stefan Karlsson stefan.karlsson at oracle.com
Wed Apr 6 07:36:54 UTC 2016


Hi all,

Please review this patch to fix an incorrect log level in 
CMSCollector::shouldConcurrentCollect.

http://cr.openjdk.java.net/~stefank/8152962/webrev.01
https://bugs.openjdk.java.net/browse/JDK-8152962

The patch sets up one LogTarget instance and uses it throughout the 
function. That prevents us from accidentally logging at the wrong log level.

The patch also fixes a pre-existing bug, that we hit the following 
assert in debug builds:

~LogStreamNoResourceMark() {
   guarantee(_current_line.size() == 0, "Buffer not flushed. Missing 
call to print_cr()?");
}

This was fixed by adding a newline to the CMSStats::print_on call.

Thanks,
StefanK




More information about the hotspot-gc-dev mailing list