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

Bengt Rutisson bengt.rutisson at oracle.com
Wed Apr 6 07:57:08 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!

>
> 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.

Great that you fixed this too!

Thanks,
Bengt

>
> Thanks,
> StefanK
>



More information about the hotspot-gc-dev mailing list