RFR(S): JDK-8040002: Clean up code and code duplication in re-diryting cards for verification

Jon Masamitsu jon.masamitsu at oracle.com
Tue Apr 15 14:24:00 UTC 2014


Thomas,

http://cr.openjdk.java.net/~tschatzl/8040002/webrev/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.frames.html

Changes look good.

Just a clarification.

So the is_in_reserved() test was an attempt to
make do_card_ptr() faster?

  163   bool do_card_ptr(jbyte* card_ptr, uint worker_i) {
  164     if (_g1h->is_in_reserved(_ctbs->addr_for(card_ptr))) {
  165       _calls++;
  166       *card_ptr = 0;
  167     }
  168     return true;
  169   }


And the assertion checking that addr_for() does on the
address card_ptr is not needed?

Jon

On 04/14/2014 02:59 AM, Thomas Schatzl wrote:
> Hi all,
>
>    can I have reviews for the following short cleanup? While implementing
> 8019342 I found that there is some opportunity to clean up code in the
> various card closures in G1.
>
> There is some code duplication, and the verification card closure code
> still assumes the presence of a perm gen. There are also some hardcoded
> card table values for clean/dirty cards.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8040002
>
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8040002/webrev/
>
> Testing:
> jprt
>
> Thanks,
>    Thomas
>
>




More information about the hotspot-gc-dev mailing list