8057658: Enable G1 FullGC extensions

Refactored the G1 FullGC code to enable it to be extended.

Reviewed-by: mgerdin, brutisso
This commit is contained in:
Stefan Johansson 2014-09-09 00:05:25 +02:00
parent 938374d5f9
commit 3e6d46d28b
9 changed files with 141 additions and 85 deletions

View file

@ -66,10 +66,11 @@ bool HeapRegionManager::is_free(HeapRegion* hr) const {
#endif
HeapRegion* HeapRegionManager::new_heap_region(uint hrm_index) {
HeapWord* bottom = G1CollectedHeap::heap()->bottom_addr_for_region(hrm_index);
G1CollectedHeap* g1h = G1CollectedHeap::heap();
HeapWord* bottom = g1h->bottom_addr_for_region(hrm_index);
MemRegion mr(bottom, bottom + HeapRegion::GrainWords);
assert(reserved().contains(mr), "invariant");
return new HeapRegion(hrm_index, G1CollectedHeap::heap()->bot_shared(), mr);
return g1h->allocator()->new_heap_region(hrm_index, g1h->bot_shared(), mr);
}
void HeapRegionManager::commit_regions(uint index, size_t num_regions) {