8279910: G1: Simplify HeapRegionRemSet::add_reference
Reviewed-by: tschatzl, ayang
This commit is contained in:
parent
3edcb13272
commit
5d52bf9987
src/hotspot/share/gc/g1
@ -274,7 +274,9 @@ template <class T> void G1RebuildRemSetClosure::do_oop_work(T* p) {
|
||||
|
||||
HeapRegion* to = _g1h->heap_region_containing(obj);
|
||||
HeapRegionRemSet* rem_set = to->rem_set();
|
||||
rem_set->add_reference(p, _worker_id);
|
||||
if (rem_set->is_tracked()) {
|
||||
rem_set->add_reference(p, _worker_id);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SHARE_GC_G1_G1OOPCLOSURES_INLINE_HPP
|
||||
|
@ -123,10 +123,7 @@ void HeapRegionRemSet::split_card(OopOrNarrowOopStar from, uint& card_region, ui
|
||||
}
|
||||
|
||||
void HeapRegionRemSet::add_reference(OopOrNarrowOopStar from, uint tid) {
|
||||
RemSetState state = _state;
|
||||
if (state == Untracked) {
|
||||
return;
|
||||
}
|
||||
assert(_state != Untracked, "must be");
|
||||
|
||||
uint cur_idx = _hr->hrm_index();
|
||||
uintptr_t from_card = uintptr_t(from) >> CardTable::card_shift();
|
||||
|
Loading…
x
Reference in New Issue
Block a user