RFR(S): JDK-8042474: Clean up duplicated code in RSHashTable

Thomas Schatzl thomas.schatzl at oracle.com
Thu May 8 08:49:44 UTC 2014


Hi,

On Thu, 2014-05-08 at 10:01 +0200, Andreas Sjöberg wrote:
> Hi all,
> 
> could I please have reviews for this small cleanup?
> For RSHashTable, it
>  - removes entry_for_region_ind(RegionIdx_t)
>  - changes get_entry to be public and declared const

Get_entry() has already been public. That does not seem to be required
though, it seems to be only used within the SparsePRT class.

>  - changes the sites that called entry_for_region to instead use
> get_entry, since they have the same implementation.
>  - changes get_cards to make use of get_entry instead of very similar
> code contained inline.
> 
> webrev: http://cr.openjdk.java.net/~brutisso/JDK-8042474/01/webrev/

Looks good except for the duplicate asserts Bengt mentioned :)
> 
> It seems get_cards is not used. Maybe it should be removed as a
> separate CR?

Like Bengt I do not mind either way - please also fix up visibility of
the methods :)

Thanks,
  Thomas




More information about the hotspot-gc-dev mailing list