equal
deleted
inserted
replaced
81 reuse_retained_old_region(evacuation_info, |
81 reuse_retained_old_region(evacuation_info, |
82 &_old_gc_alloc_region, |
82 &_old_gc_alloc_region, |
83 &_retained_old_gc_alloc_region); |
83 &_retained_old_gc_alloc_region); |
84 } |
84 } |
85 |
85 |
86 void G1DefaultAllocator::release_gc_alloc_regions(uint no_of_gc_workers, EvacuationInfo& evacuation_info) { |
86 void G1DefaultAllocator::release_gc_alloc_regions(EvacuationInfo& evacuation_info) { |
87 AllocationContext_t context = AllocationContext::current(); |
87 AllocationContext_t context = AllocationContext::current(); |
88 evacuation_info.set_allocation_regions(survivor_gc_alloc_region(context)->count() + |
88 evacuation_info.set_allocation_regions(survivor_gc_alloc_region(context)->count() + |
89 old_gc_alloc_region(context)->count()); |
89 old_gc_alloc_region(context)->count()); |
90 survivor_gc_alloc_region(context)->release(); |
90 survivor_gc_alloc_region(context)->release(); |
91 // If we have an old GC alloc region to release, we'll save it in |
91 // If we have an old GC alloc region to release, we'll save it in |
97 if (_retained_old_gc_alloc_region != NULL) { |
97 if (_retained_old_gc_alloc_region != NULL) { |
98 _retained_old_gc_alloc_region->record_retained_region(); |
98 _retained_old_gc_alloc_region->record_retained_region(); |
99 } |
99 } |
100 |
100 |
101 if (ResizePLAB) { |
101 if (ResizePLAB) { |
102 _g1h->alloc_buffer_stats(InCSetState::Young)->adjust_desired_plab_sz(no_of_gc_workers); |
102 _g1h->alloc_buffer_stats(InCSetState::Young)->adjust_desired_plab_sz(); |
103 _g1h->alloc_buffer_stats(InCSetState::Old)->adjust_desired_plab_sz(no_of_gc_workers); |
103 _g1h->alloc_buffer_stats(InCSetState::Old)->adjust_desired_plab_sz(); |
104 } |
104 } |
105 } |
105 } |
106 |
106 |
107 void G1DefaultAllocator::abandon_gc_alloc_regions() { |
107 void G1DefaultAllocator::abandon_gc_alloc_regions() { |
108 assert(survivor_gc_alloc_region(AllocationContext::current())->get() == NULL, "pre-condition"); |
108 assert(survivor_gc_alloc_region(AllocationContext::current())->get() == NULL, "pre-condition"); |