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

Stefan Johansson stefan.johansson at oracle.com
Wed Apr 6 09:07:32 UTC 2016


Hi StefanK,

On 2016-04-06 09:36, Stefan Karlsson wrote:
> 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
Looks good,
StefanJ
>
> 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