RFR (S): 8023021: Unnecessary clearing of the card table introduced by the fix for JDK-8023013

Bengt Rutisson bengt.rutisson at oracle.com
Wed Aug 14 14:04:20 UTC 2013

Hi all,

Erik discovered a bug with the change for JDK-8023013 that I just 
pushed. With my change we will do some unnecessary clearing of the card 

Here's a webrev to fix that:

Thanks Erik for finding this!

 From the bug report:

The fix for JDK-8023013 "Use specific generations rather than generation 
iteration" introduced unnecessary clearing of the card table.

This loop (which existed both in CardTableRS::clear_into_younger() and 

   Generation* g = gen;
   for(Generation* prev_gen = gch->prev_gen(g); prev_gen != NULL;
       g = prev_gen, prev_gen = gch->prev_gen(g)) {

was translated in to one call for the old generation and one for the 
young generation. But this is wrong. The loop is actually not a loop 
when we only have two generations. These methods are only called with 
gen being the old generation, so the translation should be to only do 
one call to the old generation. No work should be done for the young 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20130814/f1ec704f/attachment.htm>

More information about the hotspot-gc-dev mailing list