1032
1033 #if COMPILER2_OR_JVMCI
1034 DerivedPointerTable::clear();
1035 #endif
1036
1037 ref_processor()->start_discovery(clear_all_soft_refs);
1038
1039 ClassUnloadingContext ctx(1 /* num_nmethod_unlink_workers */,
1040 false /* unregister_nmethods_during_purge */,
1041 false /* lock_nmethod_free_separately */);
1042
1043 marking_phase(&_gc_tracer);
1044
1045 summary_phase();
1046
1047 #if COMPILER2_OR_JVMCI
1048 assert(DerivedPointerTable::is_active(), "Sanity");
1049 DerivedPointerTable::set_active(false);
1050 #endif
1051
1052 forward_to_new_addr();
1053
1054 adjust_pointers();
1055
1056 compact();
1057
1058 ParCompactionManager::_preserved_marks_set->restore(&ParallelScavengeHeap::heap()->workers());
1059
1060 ParCompactionManager::verify_all_region_stack_empty();
1061
1062 // Reset the mark bitmap, summary data, and do other bookkeeping. Must be
1063 // done before resizing.
1064 post_compact();
1065
1066 // Let the size policy know we're done
1067 size_policy->major_collection_end(old_gen->used_in_bytes(), gc_cause);
1068
1069 if (UseAdaptiveSizePolicy) {
1070 log_debug(gc, ergo)("AdaptiveSizeStart: collection: %d ", heap->total_collections());
1071 log_trace(gc, ergo)("old_gen_capacity: " SIZE_FORMAT " young_gen_capacity: " SIZE_FORMAT,
1072 old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
1073
1074 // Don't check if the size_policy is ready here. Let
1075 // the size_policy check that internally.
1076 if (UseAdaptiveGenerationSizePolicyAtMajorCollection &&
1077 AdaptiveSizePolicy::should_update_promo_stats(gc_cause)) {
|
1032
1033 #if COMPILER2_OR_JVMCI
1034 DerivedPointerTable::clear();
1035 #endif
1036
1037 ref_processor()->start_discovery(clear_all_soft_refs);
1038
1039 ClassUnloadingContext ctx(1 /* num_nmethod_unlink_workers */,
1040 false /* unregister_nmethods_during_purge */,
1041 false /* lock_nmethod_free_separately */);
1042
1043 marking_phase(&_gc_tracer);
1044
1045 summary_phase();
1046
1047 #if COMPILER2_OR_JVMCI
1048 assert(DerivedPointerTable::is_active(), "Sanity");
1049 DerivedPointerTable::set_active(false);
1050 #endif
1051
1052 FullGCForwarding::begin();
1053
1054 forward_to_new_addr();
1055
1056 adjust_pointers();
1057
1058 compact();
1059
1060 FullGCForwarding::end();
1061
1062 ParCompactionManager::_preserved_marks_set->restore(&ParallelScavengeHeap::heap()->workers());
1063
1064 ParCompactionManager::verify_all_region_stack_empty();
1065
1066 // Reset the mark bitmap, summary data, and do other bookkeeping. Must be
1067 // done before resizing.
1068 post_compact();
1069
1070 // Let the size policy know we're done
1071 size_policy->major_collection_end(old_gen->used_in_bytes(), gc_cause);
1072
1073 if (UseAdaptiveSizePolicy) {
1074 log_debug(gc, ergo)("AdaptiveSizeStart: collection: %d ", heap->total_collections());
1075 log_trace(gc, ergo)("old_gen_capacity: " SIZE_FORMAT " young_gen_capacity: " SIZE_FORMAT,
1076 old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
1077
1078 // Don't check if the size_policy is ready here. Let
1079 // the size_policy check that internally.
1080 if (UseAdaptiveGenerationSizePolicyAtMajorCollection &&
1081 AdaptiveSizePolicy::should_update_promo_stats(gc_cause)) {
|