< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Print this page
rev 60538 : imported patch jep387-misc.patch


1012   abandon_collection_set(collection_set());
1013 
1014   tear_down_region_sets(false /* free_list_only */);
1015 
1016   hrm()->prepare_for_full_collection_start();
1017 }
1018 
1019 void G1CollectedHeap::verify_before_full_collection(bool explicit_gc) {
1020   assert(!GCCause::is_user_requested_gc(gc_cause()) || explicit_gc, "invariant");
1021   assert_used_and_recalculate_used_equal(this);
1022   _verifier->verify_region_sets_optional();
1023   _verifier->verify_before_gc(G1HeapVerifier::G1VerifyFull);
1024   _verifier->check_bitmaps("Full GC Start");
1025 }
1026 
1027 void G1CollectedHeap::prepare_heap_for_mutators() {
1028   hrm()->prepare_for_full_collection_end();
1029 
1030   // Delete metaspaces for unloaded class loaders and clean up loader_data graph
1031   ClassLoaderDataGraph::purge();
1032   MetaspaceUtils::verify_metrics();
1033 
1034   // Prepare heap for normal collections.
1035   assert(num_free_regions() == 0, "we should not have added any free regions");
1036   rebuild_region_sets(false /* free_list_only */);
1037   abort_refinement();
1038   resize_heap_if_necessary();
1039 
1040   // Rebuild the strong code root lists for each region
1041   rebuild_strong_code_roots();
1042 
1043   // Purge code root memory
1044   purge_code_root_memory();
1045 
1046   // Start a new incremental collection set for the next pause
1047   start_new_collection_set();
1048 
1049   _allocator->init_mutator_alloc_regions();
1050 
1051   // Post collection state updates.
1052   MetaspaceGC::compute_new_size();




1012   abandon_collection_set(collection_set());
1013 
1014   tear_down_region_sets(false /* free_list_only */);
1015 
1016   hrm()->prepare_for_full_collection_start();
1017 }
1018 
1019 void G1CollectedHeap::verify_before_full_collection(bool explicit_gc) {
1020   assert(!GCCause::is_user_requested_gc(gc_cause()) || explicit_gc, "invariant");
1021   assert_used_and_recalculate_used_equal(this);
1022   _verifier->verify_region_sets_optional();
1023   _verifier->verify_before_gc(G1HeapVerifier::G1VerifyFull);
1024   _verifier->check_bitmaps("Full GC Start");
1025 }
1026 
1027 void G1CollectedHeap::prepare_heap_for_mutators() {
1028   hrm()->prepare_for_full_collection_end();
1029 
1030   // Delete metaspaces for unloaded class loaders and clean up loader_data graph
1031   ClassLoaderDataGraph::purge();
1032   DEBUG_ONLY(MetaspaceUtils::verify(false);)
1033 
1034   // Prepare heap for normal collections.
1035   assert(num_free_regions() == 0, "we should not have added any free regions");
1036   rebuild_region_sets(false /* free_list_only */);
1037   abort_refinement();
1038   resize_heap_if_necessary();
1039 
1040   // Rebuild the strong code root lists for each region
1041   rebuild_strong_code_roots();
1042 
1043   // Purge code root memory
1044   purge_code_root_memory();
1045 
1046   // Start a new incremental collection set for the next pause
1047   start_new_collection_set();
1048 
1049   _allocator->init_mutator_alloc_regions();
1050 
1051   // Post collection state updates.
1052   MetaspaceGC::compute_new_size();


< prev index next >