1044 heap->young_gen(), heap->old_gen());
1045 }
1046
1047 // Update heap occupancy information which is used as input to the soft ref
1048 // clearing policy at the next gc.
1049 Universe::update_heap_info_at_gc();
1050
1051 bool young_gen_empty = eden_empty && from_space->is_empty() &&
1052 to_space->is_empty();
1053
1054 PSCardTable* ct = heap->card_table();
1055 MemRegion old_mr = heap->old_gen()->reserved();
1056 if (young_gen_empty) {
1057 ct->clear(MemRegion(old_mr.start(), old_mr.end()));
1058 } else {
1059 ct->invalidate(MemRegion(old_mr.start(), old_mr.end()));
1060 }
1061
1062 // Delete metaspaces for unloaded class loaders and clean up loader_data graph
1063 ClassLoaderDataGraph::purge();
1064 MetaspaceUtils::verify_metrics();
1065
1066 heap->prune_scavengable_nmethods();
1067
1068 #if COMPILER2_OR_JVMCI
1069 DerivedPointerTable::update_pointers();
1070 #endif
1071
1072 if (ZapUnusedHeapArea) {
1073 heap->gen_mangle_unused_area();
1074 }
1075
1076 // Update time of last GC
1077 reset_millis_since_last_gc();
1078 }
1079
1080 HeapWord*
1081 PSParallelCompact::compute_dense_prefix_via_density(const SpaceId id,
1082 bool maximum_compaction)
1083 {
1084 const size_t region_size = ParallelCompactData::RegionSize;
|
1044 heap->young_gen(), heap->old_gen());
1045 }
1046
1047 // Update heap occupancy information which is used as input to the soft ref
1048 // clearing policy at the next gc.
1049 Universe::update_heap_info_at_gc();
1050
1051 bool young_gen_empty = eden_empty && from_space->is_empty() &&
1052 to_space->is_empty();
1053
1054 PSCardTable* ct = heap->card_table();
1055 MemRegion old_mr = heap->old_gen()->reserved();
1056 if (young_gen_empty) {
1057 ct->clear(MemRegion(old_mr.start(), old_mr.end()));
1058 } else {
1059 ct->invalidate(MemRegion(old_mr.start(), old_mr.end()));
1060 }
1061
1062 // Delete metaspaces for unloaded class loaders and clean up loader_data graph
1063 ClassLoaderDataGraph::purge();
1064 DEBUG_ONLY(MetaspaceUtils::verify(false);)
1065
1066 heap->prune_scavengable_nmethods();
1067
1068 #if COMPILER2_OR_JVMCI
1069 DerivedPointerTable::update_pointers();
1070 #endif
1071
1072 if (ZapUnusedHeapArea) {
1073 heap->gen_mangle_unused_area();
1074 }
1075
1076 // Update time of last GC
1077 reset_millis_since_last_gc();
1078 }
1079
1080 HeapWord*
1081 PSParallelCompact::compute_dense_prefix_via_density(const SpaceId id,
1082 bool maximum_compaction)
1083 {
1084 const size_t region_size = ParallelCompactData::RegionSize;
|