RFR (S): 8231956: Remove seq_add_card/reference from PerRegionTable class

Thomas Schatzl thomas.schatzl at oracle.com
Tue Oct 8 07:50:38 UTC 2019


Hi all,

   can I have reviews for this small change that removes some unused 
methods and performs associated cleanup of unnecessary parameters?

There is one related cleanup that might raise some questions:

   38 inline void PerRegionTable::add_card_work(CardIdx_t from_card, 
bool par) {
   39   if (!_bm.at(from_card)) {
   40     if (par) {
   41       if (_bm.par_set_bit(from_card)) {
   42         Atomic::inc(&_occupied);

changed to

   38 inline void PerRegionTable::add_card(CardIdx_t from_card_index) {
   39   if (_bm.par_set_bit(from_card_index)) {


The reason for this change is that BitMap::par_set_bit() implicitly 
performs the BitMap::at() check even without doing a cmpxchg, 
duplicating this functionality.

CR:
https://bugs.openjdk.java.net/browse/JDK-8231956
Webrev:
http://cr.openjdk.java.net/~tschatzl/8231956/webrev/
Testing:
hs-tier1-5

Thanks,
   Thomas



More information about the hotspot-gc-dev mailing list