8231956: Remove seq_add_card/reference from PerRegionTable class
Reviewed-by: sjohanss, pliden
This commit is contained in:
parent
e598c94852
commit
5e9b772767
@ -186,10 +186,6 @@ protected:
|
||||
_collision_list_next(NULL)
|
||||
{}
|
||||
|
||||
inline void add_card_work(CardIdx_t from_card, bool par);
|
||||
|
||||
inline void add_reference_work(OopOrNarrowOopStar from, bool par);
|
||||
|
||||
public:
|
||||
// We need access in order to union things into the base table.
|
||||
BitMap* bm() { return &_bm; }
|
||||
@ -206,12 +202,8 @@ public:
|
||||
|
||||
inline void add_reference(OopOrNarrowOopStar from);
|
||||
|
||||
inline void seq_add_reference(OopOrNarrowOopStar from);
|
||||
|
||||
inline void add_card(CardIdx_t from_card_index);
|
||||
|
||||
void seq_add_card(CardIdx_t from_card_index);
|
||||
|
||||
// (Destructively) union the bitmap of the current table into the given
|
||||
// bitmap (which is assumed to be of the same size.)
|
||||
void union_bitmap_into(BitMap* bm) {
|
||||
@ -381,12 +373,6 @@ public:
|
||||
_state = Complete;
|
||||
}
|
||||
|
||||
// Used in the sequential case.
|
||||
void add_reference(OopOrNarrowOopStar from) {
|
||||
add_reference(from, 0);
|
||||
}
|
||||
|
||||
// Used in the parallel case.
|
||||
void add_reference(OopOrNarrowOopStar from, uint tid) {
|
||||
RemSetState state = _state;
|
||||
if (state == Untracked) {
|
||||
|
@ -35,20 +35,13 @@ inline void HeapRegionRemSet::iterate_prts(Closure& cl) {
|
||||
_other_regions.iterate(cl);
|
||||
}
|
||||
|
||||
inline void PerRegionTable::add_card_work(CardIdx_t from_card, bool par) {
|
||||
if (!_bm.at(from_card)) {
|
||||
if (par) {
|
||||
if (_bm.par_set_bit(from_card)) {
|
||||
Atomic::inc(&_occupied);
|
||||
}
|
||||
} else {
|
||||
_bm.set_bit(from_card);
|
||||
_occupied++;
|
||||
}
|
||||
inline void PerRegionTable::add_card(CardIdx_t from_card_index) {
|
||||
if (_bm.par_set_bit(from_card_index)) {
|
||||
Atomic::inc(&_occupied);
|
||||
}
|
||||
}
|
||||
|
||||
inline void PerRegionTable::add_reference_work(OopOrNarrowOopStar from, bool par) {
|
||||
inline void PerRegionTable::add_reference(OopOrNarrowOopStar from) {
|
||||
// Must make this robust in case "from" is not in "_hr", because of
|
||||
// concurrency.
|
||||
|
||||
@ -58,26 +51,10 @@ inline void PerRegionTable::add_reference_work(OopOrNarrowOopStar from, bool par
|
||||
// and adding a bit to the new table is never incorrect.
|
||||
if (loc_hr->is_in_reserved(from)) {
|
||||
CardIdx_t from_card = OtherRegionsTable::card_within_region(from, loc_hr);
|
||||
add_card_work(from_card, par);
|
||||
add_card(from_card);
|
||||
}
|
||||
}
|
||||
|
||||
inline void PerRegionTable::add_card(CardIdx_t from_card_index) {
|
||||
add_card_work(from_card_index, /*parallel*/ true);
|
||||
}
|
||||
|
||||
inline void PerRegionTable::seq_add_card(CardIdx_t from_card_index) {
|
||||
add_card_work(from_card_index, /*parallel*/ false);
|
||||
}
|
||||
|
||||
inline void PerRegionTable::add_reference(OopOrNarrowOopStar from) {
|
||||
add_reference_work(from, /*parallel*/ true);
|
||||
}
|
||||
|
||||
inline void PerRegionTable::seq_add_reference(OopOrNarrowOopStar from) {
|
||||
add_reference_work(from, /*parallel*/ false);
|
||||
}
|
||||
|
||||
inline void PerRegionTable::init(HeapRegion* hr, bool clear_links_to_all_list) {
|
||||
if (clear_links_to_all_list) {
|
||||
set_next(NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user