mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8186571: Implementation: JEP 307: Parallel Full GC for G1
Improve G1 worst-case latencies by making the full GC parallel. Reviewed-by: tschatzl, sangheki, ehelin
This commit is contained in:
parent
fdab870aff
commit
6929e0f05a
71 changed files with 2799 additions and 903 deletions
|
@ -327,9 +327,7 @@ bool HeapRegionManager::allocate_containing_regions(MemRegion range, size_t* com
|
|||
return true;
|
||||
}
|
||||
|
||||
void HeapRegionManager::par_iterate(HeapRegionClosure* blk, uint worker_id, HeapRegionClaimer* hrclaimer) const {
|
||||
const uint start_index = hrclaimer->start_region_for_worker(worker_id);
|
||||
|
||||
void HeapRegionManager::par_iterate(HeapRegionClosure* blk, HeapRegionClaimer* hrclaimer, const uint start_index) const {
|
||||
// Every worker will actually look at all regions, skipping over regions that
|
||||
// are currently not committed.
|
||||
// This also (potentially) iterates over regions newly allocated during GC. This
|
||||
|
@ -493,7 +491,7 @@ HeapRegionClaimer::~HeapRegionClaimer() {
|
|||
}
|
||||
}
|
||||
|
||||
uint HeapRegionClaimer::start_region_for_worker(uint worker_id) const {
|
||||
uint HeapRegionClaimer::offset_for_worker(uint worker_id) const {
|
||||
assert(worker_id < _n_workers, "Invalid worker_id.");
|
||||
return _n_regions * worker_id / _n_workers;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue