@@ -237,7 +237,6 @@ void ShenandoahFullGC::do_it(GCCause::Cause gc_cause) {
237237 worker_slices[i] = new ShenandoahHeapRegionSet ();
238238 }
239239
240- ShenandoahGenerationalHeap::TransferResult result;
241240 {
242241 // The rest of code performs region moves, where region status is undefined
243242 // until all phases run together.
@@ -251,14 +250,7 @@ void ShenandoahFullGC::do_it(GCCause::Cause gc_cause) {
251250
252251 phase4_compact_objects (worker_slices);
253252
254- result = phase5_epilog ();
255- }
256- if (heap->mode ()->is_generational ()) {
257- LogTarget (Info, gc, ergo) lt;
258- if (lt.is_enabled ()) {
259- LogStream ls (lt);
260- result.print_on (" Full GC" , &ls);
261- }
253+ phase5_epilog ();
262254 }
263255
264256 // Resize metaspace
@@ -984,23 +976,6 @@ class ShenandoahPostCompactClosure : public ShenandoahHeapRegionClosure {
984976 r->set_live_data (live);
985977 r->reset_alloc_metadata ();
986978 }
987-
988- void update_generation_usage () {
989- if (_is_generational) {
990- _heap->old_generation ()->establish_usage (_old_regions, _old_usage, _old_humongous_waste);
991- _heap->young_generation ()->establish_usage (_young_regions, _young_usage, _young_humongous_waste);
992- } else {
993- assert (_old_regions == 0 , " Old regions only expected in generational mode" );
994- assert (_old_usage == 0 , " Old usage only expected in generational mode" );
995- assert (_old_humongous_waste == 0 , " Old humongous waste only expected in generational mode" );
996- }
997-
998- // In generational mode, global usage should be the sum of young and old. This is also true
999- // for non-generational modes except that there are no old regions.
1000- _heap->global_generation ()->establish_usage (_old_regions + _young_regions,
1001- _old_usage + _young_usage,
1002- _old_humongous_waste + _young_humongous_waste);
1003- }
1004979};
1005980
1006981void ShenandoahFullGC::compact_humongous_objects () {
@@ -1120,10 +1095,9 @@ void ShenandoahFullGC::phase4_compact_objects(ShenandoahHeapRegionSet** worker_s
11201095 }
11211096}
11221097
1123- ShenandoahGenerationalHeap::TransferResult ShenandoahFullGC::phase5_epilog () {
1098+ void ShenandoahFullGC::phase5_epilog () {
11241099 GCTraceTime (Info, gc, phases) time (" Phase 5: Full GC epilog" , _gc_timer);
11251100 ShenandoahHeap* heap = ShenandoahHeap::heap ();
1126- ShenandoahGenerationalHeap::TransferResult result;
11271101
11281102 // Reset complete bitmap. We're about to reset the complete-top-at-mark-start pointer
11291103 // and must ensure the bitmap is in sync.
@@ -1138,12 +1112,6 @@ ShenandoahGenerationalHeap::TransferResult ShenandoahFullGC::phase5_epilog() {
11381112 ShenandoahGCPhase phase (ShenandoahPhaseTimings::full_gc_copy_objects_rebuild);
11391113 ShenandoahPostCompactClosure post_compact;
11401114 heap->heap_region_iterate (&post_compact);
1141- post_compact.update_generation_usage ();
1142-
1143- if (heap->mode ()->is_generational ()) {
1144- ShenandoahGenerationalFullGC::balance_generations_after_gc (heap);
1145- }
1146-
11471115 heap->collection_set ()->clear ();
11481116 size_t young_cset_regions, old_cset_regions;
11491117 size_t first_old, last_old, num_old;
@@ -1166,11 +1134,7 @@ ShenandoahGenerationalHeap::TransferResult ShenandoahFullGC::phase5_epilog() {
11661134 _preserved_marks->restore (heap->workers ());
11671135 _preserved_marks->reclaim ();
11681136
1169- // We defer generation resizing actions until after cset regions have been recycled. We do this even following an
1170- // abbreviated cycle.
11711137 if (heap->mode ()->is_generational ()) {
1172- result = ShenandoahGenerationalFullGC::balance_generations_after_rebuilding_free_set ();
11731138 ShenandoahGenerationalFullGC::rebuild_remembered_set (heap);
11741139 }
1175- return result;
11761140}
0 commit comments