RFR(S): JDK-8042474: Clean up duplicated code in RSHashTable
andreas.sjoberg at oracle.com
Thu May 8 11:33:22 UTC 2014
I removed the duplicate asserts.
Here's a new webrev:
As for the general cleanup of unused methods, I will do that as a
Thanks for looking at this,
On 05/08/2014 10:20 AM, Bengt Rutisson wrote:
> Hi Andreas,
> On 2014-05-08 10:01, 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
>> - 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. Nice cleanup!
> One minor thing:
> These asserts in RSHashTable::get_cards():
> 204 assert(entry->r_ind() == region_ind, "Postcondition of loop +
> test above.");
> 205 assert(entry->num_valid_cards() > 0, "Inv");
> are already done in RSHashTable::get_entry(). I think you can remove
> them too.
>> It seems get_cards is not used. Maybe it should be removed as a
>> separate CR?
> Yes it is unused, so it would be good to remove it. I'm fine with
> doing that as a separate CR. Maybe in that case also go through all
> methods in sparsePRT.hpp and make sure that they are used.
>> testing: jprt.
>> Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev