mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8272216: G1: replace G1ParScanThreadState::_dest with a constant
Reviewed-by: kbarrett, tschatzl
This commit is contained in:
parent
3215dbc8b8
commit
0d0f2d07f7
@ -94,11 +94,6 @@ G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h,
|
||||
|
||||
_plab_allocator = new G1PLABAllocator(_g1h->allocator());
|
||||
|
||||
// The dest for Young is used when the objects are aged enough to
|
||||
// need to be moved to the next space.
|
||||
_dest[G1HeapRegionAttr::Young] = G1HeapRegionAttr::Old;
|
||||
_dest[G1HeapRegionAttr::Old] = G1HeapRegionAttr::Old;
|
||||
|
||||
_closures = G1EvacuationRootClosures::create_root_closures(this, _g1h);
|
||||
|
||||
_oops_into_optional_regions = new G1OopStarChunkedList[_num_optional_regions];
|
||||
@ -356,6 +351,8 @@ HeapWord* G1ParScanThreadState::allocate_in_next_plab(G1HeapRegionAttr* dest,
|
||||
}
|
||||
|
||||
G1HeapRegionAttr G1ParScanThreadState::next_region_attr(G1HeapRegionAttr const region_attr, markWord const m, uint& age) {
|
||||
assert(region_attr.is_young() || region_attr.is_old(), "must be either Young or Old");
|
||||
|
||||
if (region_attr.is_young()) {
|
||||
age = !m.has_displaced_mark_helper() ? m.age()
|
||||
: m.displaced_mark_helper().age();
|
||||
@ -363,7 +360,8 @@ G1HeapRegionAttr G1ParScanThreadState::next_region_attr(G1HeapRegionAttr const r
|
||||
return region_attr;
|
||||
}
|
||||
}
|
||||
return dest(region_attr);
|
||||
// young-to-old (promotion) or old-to-old; destination is old in both cases.
|
||||
return G1HeapRegionAttr::Old;
|
||||
}
|
||||
|
||||
void G1ParScanThreadState::report_promotion_event(G1HeapRegionAttr const dest_attr,
|
||||
|
||||
@ -55,7 +55,6 @@ class G1ParScanThreadState : public CHeapObj<mtGC> {
|
||||
G1PLABAllocator* _plab_allocator;
|
||||
|
||||
AgeTable _age_table;
|
||||
G1HeapRegionAttr _dest[G1HeapRegionAttr::Num];
|
||||
// Local tenuring threshold.
|
||||
uint _tenuring_threshold;
|
||||
G1ScanEvacuatedObjClosure _scanner;
|
||||
@ -88,14 +87,6 @@ class G1ParScanThreadState : public CHeapObj<mtGC> {
|
||||
|
||||
G1CardTable* ct() { return _ct; }
|
||||
|
||||
G1HeapRegionAttr dest(G1HeapRegionAttr original) const {
|
||||
assert(original.is_valid(),
|
||||
"Original region attr invalid: %s", original.get_type_str());
|
||||
assert(_dest[original.type()].is_valid_gen(),
|
||||
"Dest region attr is invalid: %s", _dest[original.type()].get_type_str());
|
||||
return _dest[original.type()];
|
||||
}
|
||||
|
||||
size_t _num_optional_regions;
|
||||
G1OopStarChunkedList* _oops_into_optional_regions;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user