--- old/src/share/vm/gc_implementation/g1/g1Allocator.cpp 2015-03-04 13:52:16.444944286 +0100 +++ new/src/share/vm/gc_implementation/g1/g1Allocator.cpp 2015-03-04 13:52:16.380942382 +0100 @@ -29,19 +29,19 @@ #include "gc_implementation/g1/heapRegion.inline.hpp" #include "gc_implementation/g1/heapRegionSet.inline.hpp" -void G1DefaultAllocator::init_mutator_alloc_region() { +void DefaultAllocRegionManager::init_mutator_alloc_region() { assert(_mutator_alloc_region.get() == NULL, "pre-condition"); _mutator_alloc_region.init(); } -void G1DefaultAllocator::release_mutator_alloc_region() { +void DefaultAllocRegionManager::release_mutator_alloc_region() { _mutator_alloc_region.release(); assert(_mutator_alloc_region.get() == NULL, "post-condition"); } -void G1Allocator::reuse_retained_old_region(EvacuationInfo& evacuation_info, - OldGCAllocRegion* old, - HeapRegion** retained_old) { +void AllocRegionManager::reuse_retained_old_region(EvacuationInfo& evacuation_info, + OldGCAllocRegion* old, + HeapRegion** retained_old) { HeapRegion* retained_region = *retained_old; *retained_old = NULL; @@ -73,7 +73,7 @@ } } -void G1DefaultAllocator::init_gc_alloc_regions(EvacuationInfo& evacuation_info) { +void DefaultAllocRegionManager::init_gc_alloc_regions(EvacuationInfo& evacuation_info) { assert_at_safepoint(true /* should_be_vm_thread */); _survivor_gc_alloc_region.init(); @@ -83,7 +83,7 @@ &_retained_old_gc_alloc_region); } -void G1DefaultAllocator::release_gc_alloc_regions(uint no_of_gc_workers, EvacuationInfo& evacuation_info) { +void DefaultAllocRegionManager::release_gc_alloc_regions(uint no_of_gc_workers, EvacuationInfo& evacuation_info) { AllocationContext_t context = AllocationContext::current(); evacuation_info.set_allocation_regions(survivor_gc_alloc_region(context)->count() + old_gc_alloc_region(context)->count()); @@ -104,21 +104,21 @@ } } -void G1DefaultAllocator::abandon_gc_alloc_regions() { +void DefaultAllocRegionManager::abandon_gc_alloc_regions() { assert(survivor_gc_alloc_region(AllocationContext::current())->get() == NULL, "pre-condition"); assert(old_gc_alloc_region(AllocationContext::current())->get() == NULL, "pre-condition"); _retained_old_gc_alloc_region = NULL; } -G1ParGCAllocBuffer::G1ParGCAllocBuffer(size_t gclab_word_size) : +G1PLAB::G1PLAB(size_t gclab_word_size) : ParGCAllocBuffer(gclab_word_size), _retired(true) { } -HeapWord* G1ParGCAllocator::allocate_direct_or_new_plab(InCSetState dest, - size_t word_sz, - AllocationContext_t context) { +HeapWord* PLABAllocator::allocate_direct_or_new_plab(InCSetState dest, + size_t word_sz, + AllocationContext_t context) { size_t gclab_word_size = _g1h->desired_plab_sz(dest); if (word_sz * 100 < gclab_word_size * ParallelGCBufferWastePct) { - G1ParGCAllocBuffer* alloc_buf = alloc_buffer(dest, context); + G1PLAB* alloc_buf = alloc_buffer(dest, context); add_to_alloc_buffer_waste(alloc_buf->words_remaining()); alloc_buf->retire(); @@ -138,8 +138,8 @@ } } -G1DefaultParGCAllocator::G1DefaultParGCAllocator(G1CollectedHeap* g1h) : - G1ParGCAllocator(g1h), +DefaultPLABAllocator::DefaultPLABAllocator(G1CollectedHeap* g1h) : + PLABAllocator(g1h), _surviving_alloc_buffer(g1h->desired_plab_sz(InCSetState::Young)), _tenured_alloc_buffer(g1h->desired_plab_sz(InCSetState::Old)) { for (uint state = 0; state < InCSetState::Num; state++) { @@ -149,9 +149,9 @@ _alloc_buffers[InCSetState::Old] = &_tenured_alloc_buffer; } -void G1DefaultParGCAllocator::retire_alloc_buffers() { +void DefaultPLABAllocator::retire_alloc_buffers() { for (uint state = 0; state < InCSetState::Num; state++) { - G1ParGCAllocBuffer* const buf = _alloc_buffers[state]; + G1PLAB* const buf = _alloc_buffers[state]; if (buf != NULL) { add_to_alloc_buffer_waste(buf->words_remaining()); buf->flush_and_retire_stats(_g1h->alloc_buffer_stats(state));