8306440: Rename PSS:_num_optional_regions to _max_num_optional_regions
Reviewed-by: ayang, iwalulya
This commit is contained in:
parent
9cd5741c14
commit
d518dbf726
@ -83,7 +83,7 @@ G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h,
|
|||||||
_partial_objarray_chunk_size(ParGCArrayScanChunk),
|
_partial_objarray_chunk_size(ParGCArrayScanChunk),
|
||||||
_partial_array_stepper(num_workers),
|
_partial_array_stepper(num_workers),
|
||||||
_string_dedup_requests(),
|
_string_dedup_requests(),
|
||||||
_num_optional_regions(optional_cset_length),
|
_max_num_optional_regions(optional_cset_length),
|
||||||
_numa(g1h->numa()),
|
_numa(g1h->numa()),
|
||||||
_obj_alloc_stat(NULL),
|
_obj_alloc_stat(NULL),
|
||||||
EVAC_FAILURE_INJECTOR_ONLY(_evac_failure_inject_counter(0) COMMA)
|
EVAC_FAILURE_INJECTOR_ONLY(_evac_failure_inject_counter(0) COMMA)
|
||||||
@ -106,7 +106,7 @@ G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h,
|
|||||||
|
|
||||||
_closures = G1EvacuationRootClosures::create_root_closures(this, _g1h);
|
_closures = G1EvacuationRootClosures::create_root_closures(this, _g1h);
|
||||||
|
|
||||||
_oops_into_optional_regions = new G1OopStarChunkedList[_num_optional_regions];
|
_oops_into_optional_regions = new G1OopStarChunkedList[_max_num_optional_regions];
|
||||||
|
|
||||||
initialize_numa_stats();
|
initialize_numa_stats();
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,8 @@ class G1ParScanThreadState : public CHeapObj<mtGC> {
|
|||||||
|
|
||||||
G1CardTable* ct() { return _ct; }
|
G1CardTable* ct() { return _ct; }
|
||||||
|
|
||||||
size_t _num_optional_regions;
|
// Maximum number of optional regions at start of gc.
|
||||||
|
size_t _max_num_optional_regions;
|
||||||
G1OopStarChunkedList* _oops_into_optional_regions;
|
G1OopStarChunkedList* _oops_into_optional_regions;
|
||||||
|
|
||||||
G1NUMA* _numa;
|
G1NUMA* _numa;
|
||||||
|
@ -74,8 +74,8 @@ template <typename T>
|
|||||||
inline void G1ParScanThreadState::remember_root_into_optional_region(T* p) {
|
inline void G1ParScanThreadState::remember_root_into_optional_region(T* p) {
|
||||||
oop o = RawAccess<IS_NOT_NULL>::oop_load(p);
|
oop o = RawAccess<IS_NOT_NULL>::oop_load(p);
|
||||||
uint index = _g1h->heap_region_containing(o)->index_in_opt_cset();
|
uint index = _g1h->heap_region_containing(o)->index_in_opt_cset();
|
||||||
assert(index < _num_optional_regions,
|
assert(index < _max_num_optional_regions,
|
||||||
"Trying to access optional region idx %u beyond " SIZE_FORMAT, index, _num_optional_regions);
|
"Trying to access optional region idx %u beyond " SIZE_FORMAT, index, _max_num_optional_regions);
|
||||||
_oops_into_optional_regions[index].push_root(p);
|
_oops_into_optional_regions[index].push_root(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,16 +83,16 @@ template <typename T>
|
|||||||
inline void G1ParScanThreadState::remember_reference_into_optional_region(T* p) {
|
inline void G1ParScanThreadState::remember_reference_into_optional_region(T* p) {
|
||||||
oop o = RawAccess<IS_NOT_NULL>::oop_load(p);
|
oop o = RawAccess<IS_NOT_NULL>::oop_load(p);
|
||||||
uint index = _g1h->heap_region_containing(o)->index_in_opt_cset();
|
uint index = _g1h->heap_region_containing(o)->index_in_opt_cset();
|
||||||
assert(index < _num_optional_regions,
|
assert(index < _max_num_optional_regions,
|
||||||
"Trying to access optional region idx %u beyond " SIZE_FORMAT, index, _num_optional_regions);
|
"Trying to access optional region idx %u beyond " SIZE_FORMAT, index, _max_num_optional_regions);
|
||||||
_oops_into_optional_regions[index].push_oop(p);
|
_oops_into_optional_regions[index].push_oop(p);
|
||||||
verify_task(p);
|
verify_task(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
G1OopStarChunkedList* G1ParScanThreadState::oops_into_optional_region(const HeapRegion* hr) {
|
G1OopStarChunkedList* G1ParScanThreadState::oops_into_optional_region(const HeapRegion* hr) {
|
||||||
assert(hr->index_in_opt_cset() < _num_optional_regions,
|
assert(hr->index_in_opt_cset() < _max_num_optional_regions,
|
||||||
"Trying to access optional region idx %u beyond " SIZE_FORMAT " " HR_FORMAT,
|
"Trying to access optional region idx %u beyond " SIZE_FORMAT " " HR_FORMAT,
|
||||||
hr->index_in_opt_cset(), _num_optional_regions, HR_FORMAT_PARAMS(hr));
|
hr->index_in_opt_cset(), _max_num_optional_regions, HR_FORMAT_PARAMS(hr));
|
||||||
return &_oops_into_optional_regions[hr->index_in_opt_cset()];
|
return &_oops_into_optional_regions[hr->index_in_opt_cset()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user